From a9c6f77c3e582be19d129a96084d43b6ace14947 Mon Sep 17 00:00:00 2001 From: Martijn Dekker Date: Mon, 27 Dec 2021 23:15:26 +0000 Subject: [PATCH] tests/alias.sh: fix regression test (re: f7213f03) The variable 'i' had already been used for a non-numeric purpose, so when declaring it integer in a subshell it's necessary to initialise it with value 0 or an arithmetic error is shown (which does not interrupt the test or make it fail). For the record, the errpr was mine, not Johnothan's. --- src/cmd/ksh93/tests/alias.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/ksh93/tests/alias.sh b/src/cmd/ksh93/tests/alias.sh index 490664e09..b1eb0bafe 100755 --- a/src/cmd/ksh93/tests/alias.sh +++ b/src/cmd/ksh93/tests/alias.sh @@ -271,7 +271,7 @@ ret=$? # The exit status on error must be >0, including when handling # 256 non-existent aliases. -(unalias -a; alias $(integer -s i; for((i=0;i<256;i++)) do print -n "x "; done) 2> /dev/null) +(unalias -a; alias $(integer -s i=0; for((i=0;i<256;i++)) do print -n "x "; done) 2> /dev/null) got=$? ((got > 0)) || err_exit "Exit status is zero when alias is passed 256 non-existent aliases"