aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test/hush-vars
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2010-09-10 10:17:53 +0200
committerDenys Vlasenko <dvlasenk@redhat.com>2010-09-10 10:17:53 +0200
commitebee410fe2500d6bd5980032d0b183494f509c9b (patch)
tree7d51a849f343d4b3437714aea40f7efaf6ef4050 /shell/hush_test/hush-vars
parent14e289b3246b4266499ffc5747dcc5c98bdaf5b9 (diff)
downloadbusybox-ebee410fe2500d6bd5980032d0b183494f509c9b.tar.gz
hush: fix var_bash5.tests failure
function old new delta expand_one_var 1513 1552 +39 expand_pseudo_dquoted 118 135 +17 expand_string_to_string 110 126 +16 setup_heredoc 298 308 +10 expand_and_evaluate_arith 69 79 +10 parse_stream_dquoted 233 241 +8 setup_redirects 220 225 +5 run_list 956 961 +5 expand_assignments 76 81 +5 run_pipe 1587 1590 +3 parse_stream 2371 2374 +3 builtin_umask 132 133 +1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 12/0 up/down: 122/0) Total: 122 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'shell/hush_test/hush-vars')
-rw-r--r--shell/hush_test/hush-vars/var_bash5.right13
-rwxr-xr-xshell/hush_test/hush-vars/var_bash5.tests24
2 files changed, 31 insertions, 6 deletions
diff --git a/shell/hush_test/hush-vars/var_bash5.right b/shell/hush_test/hush-vars/var_bash5.right
index 278ed3228..1990902b2 100644
--- a/shell/hush_test/hush-vars/var_bash5.right
+++ b/shell/hush_test/hush-vars/var_bash5.right
@@ -1,4 +1,11 @@
-a/
-a/d
-a/e/f
+1 a/
+2 a/d
+3 a/e/f
+4 a\
+5 a\d
+6 a\e\f
+7 a\\
+8 a\\d
+9 a\\e\\f
+a ab
Done: 0
diff --git a/shell/hush_test/hush-vars/var_bash5.tests b/shell/hush_test/hush-vars/var_bash5.tests
index 7f482a554..5748b4ac7 100755
--- a/shell/hush_test/hush-vars/var_bash5.tests
+++ b/shell/hush_test/hush-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: $?