diff --git a/src/cmd/ksh93/tests/builtins.sh b/src/cmd/ksh93/tests/builtins.sh index 2f43aab5f..58ed91cff 100755 --- a/src/cmd/ksh93/tests/builtins.sh +++ b/src/cmd/ksh93/tests/builtins.sh @@ -679,5 +679,12 @@ expect=$'*: times: incorrect syntax' actual=$(set +x; eval 'times Extra Args' 2>&1) [[ $actual == $expect ]] || err_exit "times with args: expected $(printf %q "$expect"), got $(printf %q "$actual"))" +# ====== +# 'whence' builtin +PATH=$tmp:$PATH $SHELL <<-\EOF || err_exit "'whence' gets wrong path on init" + wc=$(whence wc) + [[ -x $wc ]] +EOF + # ====== exit $((Errors<125?Errors:125)) diff --git a/src/cmd/ksh93/tests/subshell.sh b/src/cmd/ksh93/tests/subshell.sh index 37da42fc4..8187ca933 100755 --- a/src/cmd/ksh93/tests/subshell.sh +++ b/src/cmd/ksh93/tests/subshell.sh @@ -613,8 +613,7 @@ printf=$(whence -p printf) $SHELL 2> /dev/null -c '( PATH=/bin; set -o restricted) ; exit 0' || err_exit 'restoring PATH when a subshell enables restricted exits not working' $SHELL <<- \EOF - wc=$(whence wc) head=$(whence head) - print > /dev/null $( ( $head -c 1 /dev/zero | ( $wc -c) 3>&1 ) 3>&1) & + print > /dev/null $( ( dd if=/dev/zero bs=1 count=1 2>/dev/null | ( wc -c) 3>&1 ) 3>&1) & pid=$! sleep .2 kill -9 $! 2> /dev/null && err_exit '/dev/zero in command substitution hangs' diff --git a/src/cmd/ksh93/tests/variables.sh b/src/cmd/ksh93/tests/variables.sh index ecf0347d2..db93f93ef 100755 --- a/src/cmd/ksh93/tests/variables.sh +++ b/src/cmd/ksh93/tests/variables.sh @@ -440,7 +440,7 @@ function foo } x=$(foo) -(( x >.001 && x < .01 )) +(( x >.001 && x < 1 )) ' } 2> /dev/null || err_exit 'SECONDS not working in function' cat > $tmp/script <<-\!