diff --git a/src/cmd/ksh93/tests/subshell.sh b/src/cmd/ksh93/tests/subshell.sh index 9098e91c3..e7969f052 100755 --- a/src/cmd/ksh93/tests/subshell.sh +++ b/src/cmd/ksh93/tests/subshell.sh @@ -336,6 +336,17 @@ do for ((TEST=1; TEST<=${#testcase[@]}; TEST++)) shift 2 done +# Regression introduced in 93v- beta; let's make sure not to backport it to 93u+m +# Ref.: https://github.com/att/ast/issues/478 +expected='foo=bar' +actual=$( + foo=$(print `/bin/echo bar`) # should print nothing + print foo=$foo # should print "foo=bar" +) +[[ $actual == "$expected" ]] \ +|| err_exit 'Backticks nested in $( ) result in misdirected output' \ + "(expected $(printf %q "$expect"), got $(printf $q "$actual"))" + # the next tests loop on all combinations of # { SUB CAT INS TST APP } X { file-sizes } # where the file size starts at 1Ki and doubles up to and including 1Mi