From 7b4c0fd5f4df4541a1659de04823326cd22c254e Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 22 Nov 2010 17:58:14 +0100 Subject: hush: fix improper handling of newline and hash chars in few corner cases Signed-off-by: Denys Vlasenko --- shell/hush_test/hush-parsing/eol1.tests | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 shell/hush_test/hush-parsing/eol1.tests (limited to 'shell/hush_test/hush-parsing/eol1.tests') diff --git a/shell/hush_test/hush-parsing/eol1.tests b/shell/hush_test/hush-parsing/eol1.tests new file mode 100755 index 000000000..f1b55e8b8 --- /dev/null +++ b/shell/hush_test/hush-parsing/eol1.tests @@ -0,0 +1,18 @@ +# bug was that we treated as ';' in this line: +true || echo foo | +echo BAD1 | cat + +# variation on the same theme +true || echo foo | +# comment +echo BAD2 | cat + +# variation on the same theme +true || echo foo | + +echo BAD3 | cat + +# this should error out, but currently works in hush: +#true || echo foo |; + +echo Done:$? -- cgit v1.2.3