diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-05-14 16:19:34 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-05-14 16:19:34 +0000 |
commit | 03eb8bf6ce2cef8f30402b7c2b18e8479f9da1ea (patch) | |
tree | 2ca7e7d1fba638187467c1597f2746b0163c9e76 /shell/hush_test/hush-bugs | |
parent | 602d13cba552fadb8481283aa7872a4b9f206c48 (diff) | |
download | busybox-w32-03eb8bf6ce2cef8f30402b7c2b18e8479f9da1ea.tar.gz busybox-w32-03eb8bf6ce2cef8f30402b7c2b18e8479f9da1ea.tar.bz2 busybox-w32-03eb8bf6ce2cef8f30402b7c2b18e8479f9da1ea.zip |
hush: move towards more correct variable expansion
hush: fix a few cases in FOR v IN ... construct
unfortunately, code growth is big - ~600 bytes
Diffstat (limited to 'shell/hush_test/hush-bugs')
-rw-r--r-- | shell/hush_test/hush-bugs/quote3.right | 8 | ||||
-rw-r--r-- | shell/hush_test/hush-bugs/quote3.tests | 12 |
2 files changed, 20 insertions, 0 deletions
diff --git a/shell/hush_test/hush-bugs/quote3.right b/shell/hush_test/hush-bugs/quote3.right new file mode 100644 index 000000000..11443f54b --- /dev/null +++ b/shell/hush_test/hush-bugs/quote3.right | |||
@@ -0,0 +1,8 @@ | |||
1 | Testing: in $empty"" | ||
2 | .. | ||
3 | Testing: in "$*" | ||
4 | .abc d e. | ||
5 | Testing: in "$@" | ||
6 | .abc. | ||
7 | .d e. | ||
8 | Finished | ||
diff --git a/shell/hush_test/hush-bugs/quote3.tests b/shell/hush_test/hush-bugs/quote3.tests new file mode 100644 index 000000000..c52e040cc --- /dev/null +++ b/shell/hush_test/hush-bugs/quote3.tests | |||
@@ -0,0 +1,12 @@ | |||
1 | if test $# = 0; then | ||
2 | exec "$THIS_SH" quote3.tests abc "d e" | ||
3 | fi | ||
4 | |||
5 | echo 'Testing: in $empty""' | ||
6 | empty='' | ||
7 | for a in $empty""; do echo ".$a."; done | ||
8 | echo 'Testing: in "$*"' | ||
9 | for a in "$*"; do echo ".$a."; done | ||
10 | echo 'Testing: in "$@"' | ||
11 | for a in "$@"; do echo ".$a."; done | ||
12 | echo Finished | ||