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

tests/variables.sh: fix subshell error count, & another xtrace caught in comsub

(cherry picked from commit 04b4aef0cf14d255ee27305f1458b34a1d3b8b6c)
This commit is contained in:
Martijn Dekker 2020-06-05 04:01:08 +02:00
parent b6b8b522a7
commit 04722950bb

View file

@ -660,7 +660,7 @@ set --
exit $Errors
)
Errors=$? # in case of failures, ensure error count survives subshell
let "Errors += $?" # ensure error count survives subshell
cd $tmp
@ -676,7 +676,7 @@ do exp="$cmd ok"
rm -f $cmd
print print $exp > glean/$cmd
chmod +x glean/$cmd
got=$(CDPATH=:.. $SHELL -c "PATH=:/bin:/usr/bin; date > /dev/null; cd glean && ./$cmd" 2>&1)
got=$(set +x; CDPATH=:.. $SHELL -c "PATH=:/bin:/usr/bin; date > /dev/null; cd glean && ./$cmd" 2>&1)
[[ $got == "$exp" ]] || err_exit "cd with CDPATH after PATH change failed -- expected '$exp', got '$got'"
done