aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test
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
parent8f6bdb42df745425ba0ac085467105e9cc61c817 (diff)
downloadbusybox-w32-1f4cf517f5803b0e300906c487d365a331122091.tar.gz
busybox-w32-1f4cf517f5803b0e300906c487d365a331122091.tar.bz2
busybox-w32-1f4cf517f5803b0e300906c487d365a331122091.zip
hush: fix expansion of quoted $VAR, $* and $@
Diffstat (limited to 'shell/hush_test')
-rw-r--r--shell/hush_test/hush-bugs/quote3.right5
-rwxr-xr-xshell/hush_test/hush-bugs/quote3.tests4
-rw-r--r--shell/hush_test/hush-bugs/starquoted.right1
-rwxr-xr-xshell/hush_test/hush-bugs/starquoted.tests4
-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
8 files changed, 19 insertions, 14 deletions
diff --git a/shell/hush_test/hush-bugs/quote3.right b/shell/hush_test/hush-bugs/quote3.right
index 11443f54b..069a46e8f 100644
--- a/shell/hush_test/hush-bugs/quote3.right
+++ b/shell/hush_test/hush-bugs/quote3.right
@@ -1,8 +1,3 @@
1Testing: in $empty"" 1Testing: in $empty""
2.. 2..
3Testing: in "$*"
4.abc d e.
5Testing: in "$@"
6.abc.
7.d e.
8Finished 3Finished
diff --git a/shell/hush_test/hush-bugs/quote3.tests b/shell/hush_test/hush-bugs/quote3.tests
index c52e040cc..075e78570 100755
--- a/shell/hush_test/hush-bugs/quote3.tests
+++ b/shell/hush_test/hush-bugs/quote3.tests
@@ -5,8 +5,4 @@ fi
5echo 'Testing: in $empty""' 5echo 'Testing: in $empty""'
6empty='' 6empty=''
7for a in $empty""; do echo ".$a."; done 7for a in $empty""; do echo ".$a."; done
8echo 'Testing: in "$*"'
9for a in "$*"; do echo ".$a."; done
10echo 'Testing: in "$@"'
11for a in "$@"; do echo ".$a."; done
12echo Finished 8echo Finished
diff --git a/shell/hush_test/hush-bugs/starquoted.right b/shell/hush_test/hush-bugs/starquoted.right
deleted file mode 100644
index fedaf4805..000000000
--- a/shell/hush_test/hush-bugs/starquoted.right
+++ /dev/null
@@ -1 +0,0 @@
1.1 abc d e f.
diff --git a/shell/hush_test/hush-bugs/starquoted.tests b/shell/hush_test/hush-bugs/starquoted.tests
deleted file mode 100755
index 3be2026b7..000000000
--- a/shell/hush_test/hush-bugs/starquoted.tests
+++ /dev/null
@@ -1,4 +0,0 @@
1if test $# = 0; then
2 exec "$THIS_SH" starquoted.tests 1 abc 'd e f'
3fi
4for a in "$*"; do echo ".$a."; done
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 @@
1a_b='a b'
2echo "$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.1 abc d e f.
2.1.
3.abc.
4.d e f.
5.-1 abc d e f-.
6.-1.
7.abc.
8.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 @@
1if test $# = 0; then
2 exec "$THIS_SH" "$0" 1 abc 'd e f'
3fi
4
5for a in "$*"; do echo ".$a."; done
6for a in "$@"; do echo ".$a."; done
7for a in "-$*-"; do echo ".$a."; done
8for a in "-$@-"; do echo ".$a."; done