From 1e5111b0f80b1f3d7f2fc8254cb70de067317403 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 1 Apr 2018 03:04:55 +0200 Subject: ash,hush: handle a few more bkslash-newline cases Signed-off-by: Denys Vlasenko --- shell/ash_test/ash-parsing/bkslash_newline1.right | 4 ++++ shell/ash_test/ash-parsing/bkslash_newline1.tests | 8 ++++++++ shell/ash_test/ash-parsing/bkslash_newline2.right | 4 ++++ shell/ash_test/ash-parsing/bkslash_newline2.tests | 4 ++++ 4 files changed, 20 insertions(+) create mode 100644 shell/ash_test/ash-parsing/bkslash_newline1.right create mode 100755 shell/ash_test/ash-parsing/bkslash_newline1.tests create mode 100644 shell/ash_test/ash-parsing/bkslash_newline2.right create mode 100755 shell/ash_test/ash-parsing/bkslash_newline2.tests (limited to 'shell/ash_test') diff --git a/shell/ash_test/ash-parsing/bkslash_newline1.right b/shell/ash_test/ash-parsing/bkslash_newline1.right new file mode 100644 index 0000000..97ea0c1 --- /dev/null +++ b/shell/ash_test/ash-parsing/bkslash_newline1.right @@ -0,0 +1,4 @@ +and1 +and2 +or1 +ok diff --git a/shell/ash_test/ash-parsing/bkslash_newline1.tests b/shell/ash_test/ash-parsing/bkslash_newline1.tests new file mode 100755 index 0000000..6e374c4 --- /dev/null +++ b/shell/ash_test/ash-parsing/bkslash_newline1.tests @@ -0,0 +1,8 @@ +echo and1 &\ +& echo and2 + +echo or1 |\ +| echo NOT SHOWN + +case w in a) echo SKIP;\ +; w) echo ok;; esac; diff --git a/shell/ash_test/ash-parsing/bkslash_newline2.right b/shell/ash_test/ash-parsing/bkslash_newline2.right new file mode 100644 index 0000000..c863c54 --- /dev/null +++ b/shell/ash_test/ash-parsing/bkslash_newline2.right @@ -0,0 +1,4 @@ +Line with one backslash: +\ + +Ok:0 diff --git a/shell/ash_test/ash-parsing/bkslash_newline2.tests b/shell/ash_test/ash-parsing/bkslash_newline2.tests new file mode 100755 index 0000000..47d6304 --- /dev/null +++ b/shell/ash_test/ash-parsing/bkslash_newline2.tests @@ -0,0 +1,4 @@ +echo Line with one backslash: +echo '\ +' +echo Ok:$? -- cgit v1.1