diff options
author | jilles <jilles@FreeBSD.org> | 2010-08-16 21:14:49 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2010-08-16 21:14:49 +0000 |
commit | f87a1a2d3e889a1992c58a1c165ff896ba74cc68 (patch) | |
tree | 0983be615ccd8fb3335c3572c28850c1d3dfe2f1 | |
parent | ab18e93a159ed0e5080eacf9cf72a845d460d521 (diff) | |
download | FreeBSD-src-f87a1a2d3e889a1992c58a1c165ff896ba74cc68.zip FreeBSD-src-f87a1a2d3e889a1992c58a1c165ff896ba74cc68.tar.gz |
sh: Split off a more dubious test from parser/heredoc2.0.
-rw-r--r-- | tools/regression/bin/sh/parser/heredoc2.0 | 5 | ||||
-rw-r--r-- | tools/regression/bin/sh/parser/heredoc8.0 | 20 |
2 files changed, 20 insertions, 5 deletions
diff --git a/tools/regression/bin/sh/parser/heredoc2.0 b/tools/regression/bin/sh/parser/heredoc2.0 index b239520..4bb85ad 100644 --- a/tools/regression/bin/sh/parser/heredoc2.0 +++ b/tools/regression/bin/sh/parser/heredoc2.0 @@ -17,11 +17,6 @@ EOF )" = "ast*que?non"' check '"$(cat <<EOF -${s+"x"} -EOF -)" = ${dq}x${dq}' - -check '"$(cat <<EOF ${s+'$sq'x'$sq'} EOF )" = ${sq}x${sq}' diff --git a/tools/regression/bin/sh/parser/heredoc8.0 b/tools/regression/bin/sh/parser/heredoc8.0 new file mode 100644 index 0000000..598358a --- /dev/null +++ b/tools/regression/bin/sh/parser/heredoc8.0 @@ -0,0 +1,20 @@ +# $FreeBSD$ + +failures=0 + +check() { + if ! eval "[ $* ]"; then + echo "Failed: $*" + : $((failures += 1)) + fi +} + +s='ast*que?non' sq=\' dq=\" + +# This is possibly useful but differs from other shells. +check '"$(cat <<EOF +${s+"x"} +EOF +)" = ${dq}x${dq}' + +exit $((failures != 0)) |