From a3ec59c20a0c32d7c758f078750903ee585d05b5 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Fri, 19 Feb 2016 16:56:07 +0000 Subject: [PATCH] sh: Add tests for comments in sh -c. --- bin/sh/tests/parser/Makefile | 2 ++ bin/sh/tests/parser/comment1.0 | 3 +++ bin/sh/tests/parser/comment2.42 | 4 ++++ 3 files changed, 9 insertions(+) create mode 100644 bin/sh/tests/parser/comment1.0 create mode 100644 bin/sh/tests/parser/comment2.42 diff --git a/bin/sh/tests/parser/Makefile b/bin/sh/tests/parser/Makefile index 0d2ca0f9f83f..78a0734d9be7 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 000000000000..21e7ade957bc --- /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 000000000000..196b73354493 --- /dev/null +++ b/bin/sh/tests/parser/comment2.42 @@ -0,0 +1,4 @@ +# $FreeBSD$ + +${SH} -c '# +exit 42'