From 4709df0f152c477c191f83e18bfecabb2fb2c1f9 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 10 Apr 2018 14:49:01 +0200 Subject: hush: fix handling of \ in double-quoted strings function old new delta encode_string 268 250 -18 Signed-off-by: Denys Vlasenko --- shell/hush_test/hush-parsing/bkslash_eof2.right | 2 ++ shell/hush_test/hush-parsing/bkslash_eof2.tests | 4 ++++ 2 files changed, 6 insertions(+) create mode 100644 shell/hush_test/hush-parsing/bkslash_eof2.right create mode 100755 shell/hush_test/hush-parsing/bkslash_eof2.tests (limited to 'shell/hush_test') diff --git a/shell/hush_test/hush-parsing/bkslash_eof2.right b/shell/hush_test/hush-parsing/bkslash_eof2.right new file mode 100644 index 000000000..8be75727f --- /dev/null +++ b/shell/hush_test/hush-parsing/bkslash_eof2.right @@ -0,0 +1,2 @@ +hush: syntax error: unterminated " +One:1 diff --git a/shell/hush_test/hush-parsing/bkslash_eof2.tests b/shell/hush_test/hush-parsing/bkslash_eof2.tests new file mode 100755 index 000000000..da1f08db6 --- /dev/null +++ b/shell/hush_test/hush-parsing/bkslash_eof2.tests @@ -0,0 +1,4 @@ +printf 'echo "unterminated string\\' >test.tmp.sh +. ./test.tmp.sh +echo One:$? +rm -f test.tmp.sh -- cgit v1.2.3