summaryrefslogtreecommitdiffhomepage
path: root/shell/ash_test/ash-vars/var_bash6.tests
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-07-06 19:48:20 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-07-06 19:48:20 +0200
commit5dad7bdc3bdad8e9934d45301d5a8c51e843cd7b (patch)
treedb493d6ca6cabddcfe3e9a58f33ee712bd1584d4 /shell/ash_test/ash-vars/var_bash6.tests
parent3234045d07c3fb2a9ef8afd02f821158317adbd3 (diff)
hush: implement negative start in the ${v: -n[:m]} idiom
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash_test/ash-vars/var_bash6.tests')
-rwxr-xr-xshell/ash_test/ash-vars/var_bash6.tests9
1 files changed, 9 insertions, 0 deletions
diff --git a/shell/ash_test/ash-vars/var_bash6.tests b/shell/ash_test/ash-vars/var_bash6.tests
new file mode 100755
index 000000000..cf2e4f020
--- /dev/null
+++ b/shell/ash_test/ash-vars/var_bash6.tests
@@ -0,0 +1,9 @@
+# This testcase checks globbing correctness in ${v/a/b}
+
+>a1z; >a2z;
+ echo 'Expected' 'Actual'
+v='a bz'; echo 'a*z :' "${v/a*z/a*z}"
+v='a bz'; echo '\z :' "${v/a*z/\z}"
+v='a bz'; echo 'a1z a2z:' ${v/a*z/a*z}
+v='a bz'; echo 'z :' ${v/a*z/\z}
+rm a1z a2z