1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00

tests/variables.sh: now also test PATH (re: 222515bf)

This commit is contained in:
Martijn Dekker 2021-02-17 18:06:15 +00:00
parent 911d6b066f
commit 241b5a4af5

View file

@ -886,8 +886,8 @@ actual=$(env SHLVL="2#11+x[\$(env echo Exploited vuln CVE-2019-14868 >&2)0]" "$S
# Check unset, attribute and cleanup/restore behavior of special variables. # Check unset, attribute and cleanup/restore behavior of special variables.
# Keep the list in sync (minus ".sh") with shtab_variables[] in src/cmd/ksh93/data/variables.c # Keep the list in sync (minus ".sh") with shtab_variables[] in src/cmd/ksh93/data/variables.c
# Note: as long as changing $PATH forks a virtual subshell, "PATH" should also be excluded below.
set -- \ set -- \
"PATH" \
"PS1" \ "PS1" \
"PS2" \ "PS2" \
"IFS" \ "IFS" \
@ -1075,7 +1075,7 @@ $SHELL -c '
fi fi
done done
exit $((errors + 1)) exit $((errors + 1))
' changecase_test "$@" PATH # do include PATH here as well ' changecase_test "$@"
(((e = $?) == 1)) || err_exit "typeset -l/-u doesn't work on special variables" \ (((e = $?) == 1)) || err_exit "typeset -l/-u doesn't work on special variables" \
"(exit status $e$( ((e>128)) && print -n / && kill -l "$e"))" "(exit status $e$( ((e>128)) && print -n / && kill -l "$e"))"