summaryrefslogtreecommitdiff
path: root/shell/ash_test/ash-vars/var_bash5.tests
diff options
context:
space:
mode:
authorDenys Vlasenko2016-10-02 18:08:04 +0200
committerDenys Vlasenko2016-10-02 18:08:04 +0200
commite3354bc44aa92c20bec0ffdc78e6b57351e8f16d (patch)
tree5b1d0397af69b7bcd9f63d94705cfdbade01810a /shell/ash_test/ash-vars/var_bash5.tests
parentc4cf542c575068d55368e771abf6c358bfebf5d3 (diff)
downloadbusybox-e3354bc44aa92c20bec0ffdc78e6b57351e8f16d.zip
busybox-e3354bc44aa92c20bec0ffdc78e6b57351e8f16d.tar.gz
ash testsuite: update some of variable tests with newer versions from hush
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash_test/ash-vars/var_bash5.tests')
-rwxr-xr-xshell/ash_test/ash-vars/var_bash5.tests24
1 files changed, 21 insertions, 3 deletions
diff --git a/shell/ash_test/ash-vars/var_bash5.tests b/shell/ash_test/ash-vars/var_bash5.tests
index 7f482a5..5748b4a 100755
--- a/shell/ash_test/ash-vars/var_bash5.tests
+++ b/shell/ash_test/ash-vars/var_bash5.tests
@@ -4,8 +4,26 @@
v='a/b/c'
s='b/c'
r='e/f'
-echo "${v/$s}"
-echo "${v/$s/d}"
-echo "${v/$s/$r}"
+echo "1 ${v/$s}"
+echo "2 ${v/$s/d}"
+echo "3 ${v/$s/$r}"
+
+v='a\b\c'
+s='b\\c'
+r='e\f'
+echo "4 ${v/$s}"
+echo "5 ${v/$s/d}"
+echo "6 ${v/$s/$r}"
+
+v='a\\b\\c'
+s='b\\\\c'
+r='e\\f'
+echo "7 ${v/$s}"
+echo "8 ${v/$s/d}"
+echo "9 ${v/$s/$r}"
+
+v='a-$a-\t-\\-\"-\`-\--\z-\*-\?-b'
+s='-$a-\\t-\\\\-\\"-\\`-\\--\\z-\\\*-\\\?-'
+echo "a ${v/$s}"
echo Done: $?