summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/regression/bin/sh/parser/heredoc2.05
-rw-r--r--tools/regression/bin/sh/parser/heredoc8.020
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))
OpenPOWER on IntegriCloud