"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Christian Weisgerber <naddy@mips.inka.de>
Subject:
Re: run tests with set -u
To:
gameoftrees@openbsd.org
Date:
Tue, 8 Mar 2022 16:15:36 +0100

Download raw body.

Thread
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