aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test/hush-parsing
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-05-16 10:39:24 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-05-16 10:39:24 +0000
commit1f4cf517f5803b0e300906c487d365a331122091 (patch)
tree8ca30e71e1c0d7cb6f3b64fd9911a85c615170e8 /shell/hush_test/hush-parsing
parent8f6bdb42df745425ba0ac085467105e9cc61c817 (diff)
downloadbusybox-1f4cf517f5803b0e300906c487d365a331122091.tar.gz
hush: fix expansion of quoted $VAR, $* and $@
Diffstat (limited to 'shell/hush_test/hush-parsing')
-rw-r--r--shell/hush_test/hush-parsing/quote4.right1
-rwxr-xr-xshell/hush_test/hush-parsing/quote4.tests2
-rw-r--r--shell/hush_test/hush-parsing/starquoted.right8
-rwxr-xr-xshell/hush_test/hush-parsing/starquoted.tests8
4 files changed, 19 insertions, 0 deletions
diff --git a/shell/hush_test/hush-parsing/quote4.right b/shell/hush_test/hush-parsing/quote4.right
new file mode 100644
index 000000000..b2901ea97
--- /dev/null
+++ b/shell/hush_test/hush-parsing/quote4.right
@@ -0,0 +1 @@
+a b
diff --git a/shell/hush_test/hush-parsing/quote4.tests b/shell/hush_test/hush-parsing/quote4.tests
new file mode 100755
index 000000000..f1dabfa54
--- /dev/null
+++ b/shell/hush_test/hush-parsing/quote4.tests
@@ -0,0 +1,2 @@
+a_b='a b'
+echo "$a_b"
diff --git a/shell/hush_test/hush-parsing/starquoted.right b/shell/hush_test/hush-parsing/starquoted.right
new file mode 100644
index 000000000..b56323fe1
--- /dev/null
+++ b/shell/hush_test/hush-parsing/starquoted.right
@@ -0,0 +1,8 @@
+.1 abc d e f.
+.1.
+.abc.
+.d e f.
+.-1 abc d e f-.
+.-1.
+.abc.
+.d e f-.
diff --git a/shell/hush_test/hush-parsing/starquoted.tests b/shell/hush_test/hush-parsing/starquoted.tests
new file mode 100755
index 000000000..2fe49b1cd
--- /dev/null
+++ b/shell/hush_test/hush-parsing/starquoted.tests
@@ -0,0 +1,8 @@
+if test $# = 0; then
+ exec "$THIS_SH" "$0" 1 abc 'd e f'
+fi
+
+for a in "$*"; do echo ".$a."; done
+for a in "$@"; do echo ".$a."; done
+for a in "-$*-"; do echo ".$a."; done
+for a in "-$@-"; do echo ".$a."; done