summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2016-02-19 16:56:07 +0000
committerjilles <jilles@FreeBSD.org>2016-02-19 16:56:07 +0000
commitf4563d34505e86a964ca266dc23dad8f024c0273 (patch)
treea8d60e2549095ebe844f299b2e28183c466ecb1d /bin
parentd2cd7500c8543fa0986c77570b20641fc9c8f6ae (diff)
downloadFreeBSD-src-f4563d34505e86a964ca266dc23dad8f024c0273.zip
FreeBSD-src-f4563d34505e86a964ca266dc23dad8f024c0273.tar.gz
sh: Add tests for comments in sh -c.
Diffstat (limited to 'bin')
-rw-r--r--bin/sh/tests/parser/Makefile2
-rw-r--r--bin/sh/tests/parser/comment1.03
-rw-r--r--bin/sh/tests/parser/comment2.424
3 files changed, 9 insertions, 0 deletions
diff --git a/bin/sh/tests/parser/Makefile b/bin/sh/tests/parser/Makefile
index 0d2ca0f..78a0734 100644
--- a/bin/sh/tests/parser/Makefile
+++ b/bin/sh/tests/parser/Makefile
@@ -25,6 +25,8 @@ FILES+= alias15.0 alias15.0.stdout
FILES+= and-pipe-not.0
FILES+= case1.0
FILES+= case2.0
+FILES+= comment1.0
+FILES+= comment2.42
FILES+= dollar-quote1.0
FILES+= dollar-quote2.0
FILES+= dollar-quote3.0
diff --git a/bin/sh/tests/parser/comment1.0 b/bin/sh/tests/parser/comment1.0
new file mode 100644
index 0000000..21e7ade
--- /dev/null
+++ b/bin/sh/tests/parser/comment1.0
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+${SH} -c '#'
diff --git a/bin/sh/tests/parser/comment2.42 b/bin/sh/tests/parser/comment2.42
new file mode 100644
index 0000000..196b733
--- /dev/null
+++ b/bin/sh/tests/parser/comment2.42
@@ -0,0 +1,4 @@
+# $FreeBSD$
+
+${SH} -c '#
+exit 42'
OpenPOWER on IntegriCloud