summaryrefslogtreecommitdiff
path: root/shell/hush_test
diff options
context:
space:
mode:
authorDenys Vlasenko2018-03-02 17:13:22 +0100
committerDenys Vlasenko2018-03-02 17:13:22 +0100
commit744a20d8f9b1baf7c8cc1ed33ec744a52c89768f (patch)
tree5e4323829b6c97fe2015e927db6431d203ef5e0a /shell/hush_test
parentcc222747ae7e264cbe9b1c8a9c253860275db8a9 (diff)
downloadbusybox-744a20d8f9b1baf7c8cc1ed33ec744a52c89768f.zip
busybox-744a20d8f9b1baf7c8cc1ed33ec744a52c89768f.tar.gz
shell: two new tests, both fail for ash and hush
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test')
-rw-r--r--shell/hush_test/hush-quoting/bkslash_in_varexp.right5
-rwxr-xr-xshell/hush_test/hush-quoting/bkslash_in_varexp.tests6
-rw-r--r--shell/hush_test/hush-quoting/squote_in_varexp.right5
-rwxr-xr-xshell/hush_test/hush-quoting/squote_in_varexp.tests6
4 files changed, 22 insertions, 0 deletions
diff --git a/shell/hush_test/hush-quoting/bkslash_in_varexp.right b/shell/hush_test/hush-quoting/bkslash_in_varexp.right
new file mode 100644
index 0000000..d030470
--- /dev/null
+++ b/shell/hush_test/hush-quoting/bkslash_in_varexp.right
@@ -0,0 +1,5 @@
+Nothing:
+Nothing:
+Nothing:
+Nothing:
+Ok:0
diff --git a/shell/hush_test/hush-quoting/bkslash_in_varexp.tests b/shell/hush_test/hush-quoting/bkslash_in_varexp.tests
new file mode 100755
index 0000000..41b31ab
--- /dev/null
+++ b/shell/hush_test/hush-quoting/bkslash_in_varexp.tests
@@ -0,0 +1,6 @@
+x=a
+echo Nothing:${x#[a\]]}
+echo Nothing:"${x#[a\]]}"
+echo Nothing:${x%[a\]]}
+echo Nothing:"${x%[a\]]}"
+echo Ok:$?
diff --git a/shell/hush_test/hush-quoting/squote_in_varexp.right b/shell/hush_test/hush-quoting/squote_in_varexp.right
new file mode 100644
index 0000000..a75c0bf
--- /dev/null
+++ b/shell/hush_test/hush-quoting/squote_in_varexp.right
@@ -0,0 +1,5 @@
+z
+z
+y
+y
+Ok:0
diff --git a/shell/hush_test/hush-quoting/squote_in_varexp.tests b/shell/hush_test/hush-quoting/squote_in_varexp.tests
new file mode 100755
index 0000000..a2d05a2
--- /dev/null
+++ b/shell/hush_test/hush-quoting/squote_in_varexp.tests
@@ -0,0 +1,6 @@
+x=yz
+echo ${x#'y'}
+echo "${x#'y'}"
+echo ${x%'z'}
+echo "${x%'z'}"
+echo Ok:$?