summaryrefslogtreecommitdiff
path: root/shell/hush_test/hush-parsing
diff options
context:
space:
mode:
authorDenys Vlasenko2018-04-01 03:04:55 +0200
committerDenys Vlasenko2018-04-01 03:04:55 +0200
commit1e5111b0f80b1f3d7f2fc8254cb70de067317403 (patch)
treeee7a49ce2dad513159b7c62e43d7a645950bf207 /shell/hush_test/hush-parsing
parent32e183e63ecb46595a480ab66120795ed9c9e0df (diff)
downloadbusybox-1e5111b0f80b1f3d7f2fc8254cb70de067317403.zip
busybox-1e5111b0f80b1f3d7f2fc8254cb70de067317403.tar.gz
ash,hush: handle a few more bkslash-newline cases
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test/hush-parsing')
-rw-r--r--shell/hush_test/hush-parsing/bkslash_newline1.right4
-rwxr-xr-xshell/hush_test/hush-parsing/bkslash_newline1.tests8
-rw-r--r--shell/hush_test/hush-parsing/bkslash_newline2.right4
-rwxr-xr-xshell/hush_test/hush-parsing/bkslash_newline2.tests4
4 files changed, 20 insertions, 0 deletions
diff --git a/shell/hush_test/hush-parsing/bkslash_newline1.right b/shell/hush_test/hush-parsing/bkslash_newline1.right
new file mode 100644
index 0000000..97ea0c1
--- /dev/null
+++ b/shell/hush_test/hush-parsing/bkslash_newline1.right
@@ -0,0 +1,4 @@
+and1
+and2
+or1
+ok
diff --git a/shell/hush_test/hush-parsing/bkslash_newline1.tests b/shell/hush_test/hush-parsing/bkslash_newline1.tests
new file mode 100755
index 0000000..6e374c4
--- /dev/null
+++ b/shell/hush_test/hush-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/hush_test/hush-parsing/bkslash_newline2.right b/shell/hush_test/hush-parsing/bkslash_newline2.right
new file mode 100644
index 0000000..c863c54
--- /dev/null
+++ b/shell/hush_test/hush-parsing/bkslash_newline2.right
@@ -0,0 +1,4 @@
+Line with one backslash:
+\
+
+Ok:0
diff --git a/shell/hush_test/hush-parsing/bkslash_newline2.tests b/shell/hush_test/hush-parsing/bkslash_newline2.tests
new file mode 100755
index 0000000..47d6304
--- /dev/null
+++ b/shell/hush_test/hush-parsing/bkslash_newline2.tests
@@ -0,0 +1,4 @@
+echo Line with one backslash:
+echo '\
+'
+echo Ok:$?