aboutsummaryrefslogtreecommitdiff
path: root/bin/sh/tests/parser
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@FreeBSD.org>2015-09-02 19:49:55 +0000
committerJilles Tjoelker <jilles@FreeBSD.org>2015-09-02 19:49:55 +0000
commit92fe71faae0b9116d4a3092f4c75cc1f76bc10b3 (patch)
tree10068c99a4970e9a6a16045573916c3aa691ea81 /bin/sh/tests/parser
parent81dacd8beb51dfec0fbd5703d616efa542465d84 (diff)
Notes
Diffstat (limited to 'bin/sh/tests/parser')
-rw-r--r--bin/sh/tests/parser/Makefile1
-rw-r--r--bin/sh/tests/parser/heredoc13.021
2 files changed, 22 insertions, 0 deletions
diff --git a/bin/sh/tests/parser/Makefile b/bin/sh/tests/parser/Makefile
index cbd290721c03c..0d2ca0f9f83f5 100644
--- a/bin/sh/tests/parser/Makefile
+++ b/bin/sh/tests/parser/Makefile
@@ -57,6 +57,7 @@ FILES+= heredoc9.0
FILES+= heredoc10.0
FILES+= heredoc11.0
FILES+= heredoc12.0
+FILES+= heredoc13.0
FILES+= line-cont1.0
FILES+= line-cont2.0
FILES+= line-cont3.0
diff --git a/bin/sh/tests/parser/heredoc13.0 b/bin/sh/tests/parser/heredoc13.0
new file mode 100644
index 0000000000000..225d4f08f4929
--- /dev/null
+++ b/bin/sh/tests/parser/heredoc13.0
@@ -0,0 +1,21 @@
+# $FreeBSD$
+
+failures=0
+
+check() {
+ if ! eval "[ $* ]"; then
+ echo "Failed: $*"
+ : $((failures += 1))
+ fi
+}
+
+check '"$(cat <<""
+
+echo yes)" = "yes"'
+
+check '"$(cat <<""
+yes
+
+)" = "yes"'
+
+exit $((failures != 0))