diff options
author | jilles <jilles@FreeBSD.org> | 2015-09-02 19:49:55 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2015-09-02 19:49:55 +0000 |
commit | 6633d3a788ab02ce8b43726487d2705bbad3ea29 (patch) | |
tree | 10068c99a4970e9a6a16045573916c3aa691ea81 /bin/sh/tests | |
parent | 07e5aa0065f06f476317da8415d66994ec2d47e2 (diff) | |
download | FreeBSD-src-6633d3a788ab02ce8b43726487d2705bbad3ea29.zip FreeBSD-src-6633d3a788ab02ce8b43726487d2705bbad3ea29.tar.gz |
sh: Allow empty << EOF markers.
Diffstat (limited to 'bin/sh/tests')
-rw-r--r-- | bin/sh/tests/parser/Makefile | 1 | ||||
-rw-r--r-- | bin/sh/tests/parser/heredoc13.0 | 21 |
2 files changed, 22 insertions, 0 deletions
diff --git a/bin/sh/tests/parser/Makefile b/bin/sh/tests/parser/Makefile index cbd2907..0d2ca0f 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 0000000..225d4f0 --- /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)) |