1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-13 11:42:21 +00:00

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:
Martijn Dekker 2021-12-27 23:15:26 +00:00
parent 24174f0fb7
commit a9c6f77c3e

View file

@ -271,7 +271,7 @@ ret=$?
# The exit status on error must be >0, including when handling # The exit status on error must be >0, including when handling
# 256 non-existent aliases. # 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=$?
((got > 0)) || err_exit "Exit status is zero when alias is passed 256 non-existent aliases" ((got > 0)) || err_exit "Exit status is zero when alias is passed 256 non-existent aliases"