diff options
Diffstat (limited to 'bin/sh/tests/expansion/heredoc1.0')
-rw-r--r-- | bin/sh/tests/expansion/heredoc1.0 | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/bin/sh/tests/expansion/heredoc1.0 b/bin/sh/tests/expansion/heredoc1.0 new file mode 100644 index 000000000000..a67b2da2e5f2 --- /dev/null +++ b/bin/sh/tests/expansion/heredoc1.0 @@ -0,0 +1,25 @@ +# $FreeBSD$ + +f() { return $1; } + +[ `f 42; { cat; } <<EOF +$? +EOF +` = 42 ] || echo compound command bad + +[ `f 42; (cat) <<EOF +$? +EOF +` = 42 ] || echo subshell bad + +long=`printf %08192d 0` + +[ `f 42; { cat; } <<EOF +$long.$? +EOF +` = $long.42 ] || echo long compound command bad + +[ `f 42; (cat) <<EOF +$long.$? +EOF +` = $long.42 ] || echo long subshell bad |