From: Christian Weisgerber Subject: Re: run tests with set -u To: gameoftrees@openbsd.org Date: Tue, 8 Mar 2022 16:15:36 +0100 Stefan Sperling: > --- regress/cmdline/blame.sh > +++ regress/cmdline/blame.sh > @@ -19,7 +19,11 @@ > blame_cmp() { > local testroot="$1" > local file="$2" > - local xfail="$3" > + if [ $# -gt 2 ]; then > + local xfail="$3" > + else > + local xfail="" > + fi There's a construct for this purpose: local xfail=${3-""} -- Christian "naddy" Weisgerber naddy@mips.inka.de