summaryrefslogtreecommitdiff
path: root/shell/hush_test/hush-bugs
diff options
context:
space:
mode:
authorDenis Vlasenko2007-05-14 16:19:34 +0000
committerDenis Vlasenko2007-05-14 16:19:34 +0000
commit03eb8bf6ce2cef8f30402b7c2b18e8479f9da1ea (patch)
tree2ca7e7d1fba638187467c1597f2746b0163c9e76 /shell/hush_test/hush-bugs
parent602d13cba552fadb8481283aa7872a4b9f206c48 (diff)
downloadbusybox-03eb8bf6ce2cef8f30402b7c2b18e8479f9da1ea.zip
busybox-03eb8bf6ce2cef8f30402b7c2b18e8479f9da1ea.tar.gz
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.right8
-rw-r--r--shell/hush_test/hush-bugs/quote3.tests12
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 0000000..11443f5
--- /dev/null
+++ b/shell/hush_test/hush-bugs/quote3.right
@@ -0,0 +1,8 @@
+Testing: in $empty""
+..
+Testing: in "$*"
+.abc d e.
+Testing: in "$@"
+.abc.
+.d e.
+Finished
diff --git a/shell/hush_test/hush-bugs/quote3.tests b/shell/hush_test/hush-bugs/quote3.tests
new file mode 100644
index 0000000..c52e040
--- /dev/null
+++ b/shell/hush_test/hush-bugs/quote3.tests
@@ -0,0 +1,12 @@
+if test $# = 0; then
+ exec "$THIS_SH" quote3.tests abc "d e"
+fi
+
+echo 'Testing: in $empty""'
+empty=''
+for a in $empty""; do echo ".$a."; done
+echo 'Testing: in "$*"'
+for a in "$*"; do echo ".$a."; done
+echo 'Testing: in "$@"'
+for a in "$@"; do echo ".$a."; done
+echo Finished