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.
This commit is contained in:
parent
24174f0fb7
commit
a9c6f77c3e
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue