diff --git a/src/cmd/ksh93/tests/builtins.sh b/src/cmd/ksh93/tests/builtins.sh index b39c26d89..f75c4713d 100755 --- a/src/cmd/ksh93/tests/builtins.sh +++ b/src/cmd/ksh93/tests/builtins.sh @@ -638,7 +638,7 @@ then [[ $(kill -l HUP) == "$(kill -L HUP)" ]] || err_exit 'kill -l and kill -L a [[ $(kill -L) == *'9) KILL'* ]] || err_exit 'kill -L output does not contain 9) KILL' fi -unset ENV +export ENV=/./dev/null v=$($SHELL 2> /dev/null +o rc -ic $'getopts a:bc: opt --man\nprint $?') [[ $v == 2* ]] || err_exit 'getopts --man does not exit 2 for interactive shells' diff --git a/src/cmd/ksh93/tests/options.sh b/src/cmd/ksh93/tests/options.sh index a9b364896..5093f7d6d 100755 --- a/src/cmd/ksh93/tests/options.sh +++ b/src/cmd/ksh93/tests/options.sh @@ -29,7 +29,7 @@ Command=${0##*/} integer Errors=0 unset HISTFILE -export LC_ALL=C ENV= +export LC_ALL=C ENV=/./dev/null ulimit -c 0 @@ -109,7 +109,7 @@ else err_exit '-i ignores $ENV file' fi -export ENV= +export ENV=/./dev/null if [[ -o privileged ]] then [[ $(print env_hit | HOME=$tmp $SHELL 2>&1) == "OK" ]] && @@ -424,7 +424,7 @@ got=$( $SHELL -c '[[ $- == *c* ]]' || err_exit 'option c not in $-' > $tmp/.profile for i in i l r s D E a b e f h k n t u v x B C G H -do HOME=$tmp ENV= $SHELL -$i >/dev/null 2>&1 <<- ++EOF++ || err_exit "option $i not in \$-" +do HOME=$tmp ENV=/./dev/null $SHELL -$i >/dev/null 2>&1 <<- ++EOF++ || err_exit "option $i not in \$-" [[ \$- == *$i* ]] || exit 1 ++EOF++ done @@ -433,13 +433,13 @@ integer j=0 for i in interactive login restricted allexport notify errexit \ noglob trackall keyword noexec nounset verbose xtrace braceexpand \ noclobber globstar rc -do HOME=$tmp ENV= $SHELL -o $i >/dev/null 2>&1 <<- ++EOF++ || err_exit "option $i not equivalent to ${letters:j:1}" +do HOME=$tmp ENV=/./dev/null $SHELL -o $i >/dev/null 2>&1 <<- ++EOF++ || err_exit "option $i not equivalent to ${letters:j:1}" [[ \$- == *${letters:j:1}* ]] || exit 1 ++EOF++ ((j++)) done -export ENV= PS1="(:$$:)" +export ENV=/./dev/null PS1="(:$$:)" histfile=$tmp/history exp=$(HISTFILE=$histfile $SHELL -c $'function foo\n{\ncat\n}\ntype foo') for var in HISTSIZE HISTFILE @@ -559,6 +559,6 @@ done # process source files from profiles as profile files print '. ./dotfile' > envfile print $'alias print=:\nprint foobar' > dotfile -[[ $(ENV=$PWD/envfile $SHELL -i -c : 2>/dev/null) == foobar ]] && err_exit 'files source from profile does not process aliases correctly' +[[ $(ENV=/.$PWD/envfile $SHELL -i -c : 2>/dev/null) == foobar ]] && err_exit 'files source from profile does not process aliases correctly' exit $((Errors<125?Errors:125)) diff --git a/src/cmd/ksh93/tests/pty.sh b/src/cmd/ksh93/tests/pty.sh index b81af65be..ddae54cce 100755 --- a/src/cmd/ksh93/tests/pty.sh +++ b/src/cmd/ksh93/tests/pty.sh @@ -79,7 +79,7 @@ function tst done } -export PS1=':test-!: ' PS2='> ' PS4=': ' ENV= EXINIT= HISTFILE= TERM=dumb VISUAL=vi LC_ALL=C +export PS1=':test-!: ' PS2='> ' PS4=': ' ENV=/./dev/null EXINIT= HISTFILE= TERM=dumb VISUAL=vi LC_ALL=C if ! pty $bintrue < /dev/null then err_exit pty command hangs on $bintrue -- tests skipped diff --git a/src/cmd/ksh93/tests/shtests b/src/cmd/ksh93/tests/shtests index 4c203d4a8..926db479f 100755 --- a/src/cmd/ksh93/tests/shtests +++ b/src/cmd/ksh93/tests/shtests @@ -165,7 +165,8 @@ function valxml return $errors } -unset DISPLAY ENV FIGNORE HISTFILE +unset DISPLAY FIGNORE HISTFILE +export ENV=/./dev/null trap + PIPE # unadvertized -- set SIGPIPE to SIG_DFL # integer compile=-1 posix=-1 utf8=-1