diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-05-21 19:52:01 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-05-21 19:52:01 +0200 |
commit | 7436950a7516d1f4498285ccc81bf6d926f3af5e (patch) | |
tree | 392a5f5eaed215eaacaded7bc92456729161e1d0 /shell/hush_test/hush-vars | |
parent | 3f78cec34745069cf0a92a16dfccff66d98ef5ba (diff) | |
download | busybox-w32-7436950a7516d1f4498285ccc81bf6d926f3af5e.tar.gz busybox-w32-7436950a7516d1f4498285ccc81bf6d926f3af5e.tar.bz2 busybox-w32-7436950a7516d1f4498285ccc81bf6d926f3af5e.zip |
hush: fix a=abc; c=c; echo ${a%${c}}
function old new delta
expand_vars_to_list 2229 2302 +73
add_till_closing_paren 286 313 +27
handle_dollar 623 574 -49
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 100/-49) Total: 51 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test/hush-vars')
-rw-r--r-- | shell/hush_test/hush-vars/var3.right | 2 | ||||
-rw-r--r-- | shell/hush_test/hush-vars/var_posix1.right | 6 | ||||
-rwxr-xr-x | shell/hush_test/hush-vars/var_posix1.tests | 9 |
3 files changed, 12 insertions, 5 deletions
diff --git a/shell/hush_test/hush-vars/var3.right b/shell/hush_test/hush-vars/var3.right index 5e28d2fab..40e67fdf5 100644 --- a/shell/hush_test/hush-vars/var3.right +++ b/shell/hush_test/hush-vars/var3.right | |||
@@ -1,2 +1,2 @@ | |||
1 | hush: syntax error: unterminated ${name} | 1 | hush: invalid number '1q' |
2 | hush: syntax error: unterminated ${name} | 2 | hush: syntax error: unterminated ${name} |
diff --git a/shell/hush_test/hush-vars/var_posix1.right b/shell/hush_test/hush-vars/var_posix1.right index e6cba2758..813437e2f 100644 --- a/shell/hush_test/hush-vars/var_posix1.right +++ b/shell/hush_test/hush-vars/var_posix1.right | |||
@@ -23,6 +23,7 @@ babcdcd | |||
23 | ababcdcd | 23 | ababcdcd |
24 | Empty: | 24 | Empty: |
25 | ababcdcd}_tail | 25 | ababcdcd}_tail |
26 | ababcdcd_tail | ||
26 | ababcd | 27 | ababcd |
27 | ababcd | 28 | ababcd |
28 | ababcd | 29 | ababcd |
@@ -32,5 +33,8 @@ ababcdc | |||
32 | ababcdcd | 33 | ababcdcd |
33 | Empty: | 34 | Empty: |
34 | ababcdcd}_tail | 35 | ababcdcd}_tail |
36 | ababcdcd_tail | ||
35 | ababcdcd | 37 | ababcdcd |
36 | end | 38 | ab |
39 | ab | ||
40 | End | ||
diff --git a/shell/hush_test/hush-vars/var_posix1.tests b/shell/hush_test/hush-vars/var_posix1.tests index c1f64094d..e48fd98c7 100755 --- a/shell/hush_test/hush-vars/var_posix1.tests +++ b/shell/hush_test/hush-vars/var_posix1.tests | |||
@@ -31,7 +31,7 @@ echo ${var##?} | |||
31 | echo ${var#*} | 31 | echo ${var#*} |
32 | echo Empty:${var##*} | 32 | echo Empty:${var##*} |
33 | echo ${var#}}_tail | 33 | echo ${var#}}_tail |
34 | # UNFIXED BUG: echo ${var#\}}_tail | 34 | echo ${var#\}}_tail |
35 | 35 | ||
36 | echo ${var%cd} | 36 | echo ${var%cd} |
37 | echo ${var%%cd} | 37 | echo ${var%%cd} |
@@ -42,7 +42,10 @@ echo ${var%%?} | |||
42 | echo ${var%*} | 42 | echo ${var%*} |
43 | echo Empty:${var%%*} | 43 | echo Empty:${var%%*} |
44 | echo ${var#}}_tail | 44 | echo ${var#}}_tail |
45 | # UNFIXED BUG: echo ${var#\}}_tail | 45 | echo ${var#\}}_tail |
46 | echo ${var%\\*} | 46 | echo ${var%\\*} |
47 | 47 | ||
48 | echo end | 48 | a=ab}; echo ${a%\}}; |
49 | a=abc; c=c; echo ${a%${c}} | ||
50 | |||
51 | echo End | ||