Skip to content

Commit

Permalink
tests/variables.sh: now also test PATH (re: 222515b)
Browse files Browse the repository at this point in the history
  • Loading branch information
McDutchie committed Feb 17, 2021
1 parent 911d6b0 commit 241b5a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cmd/ksh93/tests/variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.

# 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 -- \
"PATH" \
"PS1" \
"PS2" \
"IFS" \
Expand Down Expand Up @@ -1075,7 +1075,7 @@ $SHELL -c '
fi
done
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" \
"(exit status $e$( ((e>128)) && print -n / && kill -l "$e"))"

Expand Down

0 comments on commit 241b5a4

Please sign in to comment.