shell: two new tests, both fail for ash and hush
authorDenys Vlasenko <vda.linux@googlemail.com>
Fri, 2 Mar 2018 16:13:22 +0000 (17:13 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Fri, 2 Mar 2018 16:13:22 +0000 (17:13 +0100)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/ash_test/ash-quoting/bkslash_in_varexp.right [new file with mode: 0644]
shell/ash_test/ash-quoting/bkslash_in_varexp.tests [new file with mode: 0755]
shell/ash_test/ash-quoting/squote_in_varexp.right [new file with mode: 0644]
shell/ash_test/ash-quoting/squote_in_varexp.tests [new file with mode: 0755]
shell/hush_test/hush-quoting/bkslash_in_varexp.right [new file with mode: 0644]
shell/hush_test/hush-quoting/bkslash_in_varexp.tests [new file with mode: 0755]
shell/hush_test/hush-quoting/squote_in_varexp.right [new file with mode: 0644]
shell/hush_test/hush-quoting/squote_in_varexp.tests [new file with mode: 0755]

diff --git a/shell/ash_test/ash-quoting/bkslash_in_varexp.right b/shell/ash_test/ash-quoting/bkslash_in_varexp.right
new file mode 100644 (file)
index 0000000..d030470
--- /dev/null
@@ -0,0 +1,5 @@
+Nothing:
+Nothing:
+Nothing:
+Nothing:
+Ok:0
diff --git a/shell/ash_test/ash-quoting/bkslash_in_varexp.tests b/shell/ash_test/ash-quoting/bkslash_in_varexp.tests
new file mode 100755 (executable)
index 0000000..41b31ab
--- /dev/null
@@ -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/ash_test/ash-quoting/squote_in_varexp.right b/shell/ash_test/ash-quoting/squote_in_varexp.right
new file mode 100644 (file)
index 0000000..a75c0bf
--- /dev/null
@@ -0,0 +1,5 @@
+z
+z
+y
+y
+Ok:0
diff --git a/shell/ash_test/ash-quoting/squote_in_varexp.tests b/shell/ash_test/ash-quoting/squote_in_varexp.tests
new file mode 100755 (executable)
index 0000000..a2d05a2
--- /dev/null
@@ -0,0 +1,6 @@
+x=yz
+echo ${x#'y'}
+echo "${x#'y'}"
+echo ${x%'z'}
+echo "${x%'z'}"
+echo Ok:$?
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 (file)
index 0000000..d030470
--- /dev/null
@@ -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 (executable)
index 0000000..41b31ab
--- /dev/null
@@ -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 (file)
index 0000000..a75c0bf
--- /dev/null
@@ -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 (executable)
index 0000000..a2d05a2
--- /dev/null
@@ -0,0 +1,6 @@
+x=yz
+echo ${x#'y'}
+echo "${x#'y'}"
+echo ${x%'z'}
+echo "${x%'z'}"
+echo Ok:$?