aboutsummaryrefslogtreecommitdiff
path: root/shell/ash_test
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-08-04 22:25:28 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2018-08-04 22:25:28 +0200
commitc2aa218f23a4e952746ebef7bb86668c6255471c (patch)
tree6a2884b85c52a31ad9b69e7bd2cde5d688fa139e /shell/ash_test
parent2005d3ff3661220f11e8ff1911b24051b3669566 (diff)
downloadbusybox-c2aa218f23a4e952746ebef7bb86668c6255471c.tar.gz
ash,hush: properly handle ${v//pattern/repl} if pattern starts with /
Closes 2695 function old new delta parse_dollar 762 790 +28 subevalvar 1258 1267 +9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 37/0) Total: 37 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash_test')
-rw-r--r--shell/ash_test/ash-vars/var_bash_pattern_starting_with_slash.right2
-rwxr-xr-xshell/ash_test/ash-vars/var_bash_pattern_starting_with_slash.tests3
2 files changed, 5 insertions, 0 deletions
diff --git a/shell/ash_test/ash-vars/var_bash_pattern_starting_with_slash.right b/shell/ash_test/ash-vars/var_bash_pattern_starting_with_slash.right
new file mode 100644
index 000000000..439dca578
--- /dev/null
+++ b/shell/ash_test/ash-vars/var_bash_pattern_starting_with_slash.right
@@ -0,0 +1,2 @@
+-dev-ram
+/dev-am
diff --git a/shell/ash_test/ash-vars/var_bash_pattern_starting_with_slash.tests b/shell/ash_test/ash-vars/var_bash_pattern_starting_with_slash.tests
new file mode 100755
index 000000000..b83fb8eeb
--- /dev/null
+++ b/shell/ash_test/ash-vars/var_bash_pattern_starting_with_slash.tests
@@ -0,0 +1,3 @@
+v=/dev/ram
+echo ${v////-}
+echo ${v///r/-}