summaryrefslogtreecommitdiff
path: root/shell/hush_test
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-06-09 18:40:52 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-06-09 18:40:52 +0200
commit9d617c44d2b1135d14b7dafd01a1d3992293f4d9 (patch)
treea763d31365f18cb2bb984d252bc849f03c45625a /shell/hush_test
parent2634bf366b298a827d043566656f8696f4dc153c (diff)
downloadbusybox-w32-9d617c44d2b1135d14b7dafd01a1d3992293f4d9.tar.gz
busybox-w32-9d617c44d2b1135d14b7dafd01a1d3992293f4d9.tar.bz2
busybox-w32-9d617c44d2b1135d14b7dafd01a1d3992293f4d9.zip
hush: specially handle [[ - suppress globbing & multiword expansion
It's a bashism, but is surprisingly easy to do and costs very little code. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test')
-rw-r--r--shell/hush_test/hush-bugs/export_exp.right7
-rwxr-xr-xshell/hush_test/hush-bugs/export_exp.tests19
2 files changed, 26 insertions, 0 deletions
diff --git a/shell/hush_test/hush-bugs/export_exp.right b/shell/hush_test/hush-bugs/export_exp.right
new file mode 100644
index 000000000..17a2e93f7
--- /dev/null
+++ b/shell/hush_test/hush-bugs/export_exp.right
@@ -0,0 +1,7 @@
1aa0 bb0
2a=aa0 b=bb0
3aa1 bb1
4a=aa1 b=bb1
5zzz=zzz
6zz=*
7Done
diff --git a/shell/hush_test/hush-bugs/export_exp.tests b/shell/hush_test/hush-bugs/export_exp.tests
new file mode 100755
index 000000000..91f57aa2c
--- /dev/null
+++ b/shell/hush_test/hush-bugs/export_exp.tests
@@ -0,0 +1,19 @@
1v="a=aa0 b=bb0"
2# only 1st arg should be expanded in multiple words
3export $v c=$v
4echo $a $b
5echo $c
6
7# only 1st arg should be expanded in multiple words
8export `echo a=aa1 b=bb1` c=`echo a=aa1 b=bb1`
9echo $a $b
10echo $c
11
12>zz=zz
13>zzz=zzz
14# only 1st arg should be globbed
15export zzz* zz=*
16env | grep ^zz | sort
17rm -rf zz=zz zzz=zzz
18
19echo Done