aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test/hush-parsing
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-06-18 16:29:32 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-06-18 16:29:32 +0000
commitab876cd107fe6ca274f58bae3264396745d8e5f9 (patch)
treec94ecba9c7d10af007294333e9b4c80efe079cfb /shell/hush_test/hush-parsing
parent985de15bf3f39b5e32e34cadaf6947708197f018 (diff)
downloadbusybox-w32-ab876cd107fe6ca274f58bae3264396745d8e5f9.tar.gz
busybox-w32-ab876cd107fe6ca274f58bae3264396745d8e5f9.tar.bz2
busybox-w32-ab876cd107fe6ca274f58bae3264396745d8e5f9.zip
hush: add testsuite for "no globbing in redirection" rule.
simplify redirection habdling
Diffstat (limited to 'shell/hush_test/hush-parsing')
-rw-r--r--shell/hush_test/hush-parsing/escape3.right23
-rwxr-xr-xshell/hush_test/hush-parsing/escape3.tests8
-rw-r--r--shell/hush_test/hush-parsing/redir_space.right3
-rwxr-xr-xshell/hush_test/hush-parsing/redir_space.tests6
4 files changed, 40 insertions, 0 deletions
diff --git a/shell/hush_test/hush-parsing/escape3.right b/shell/hush_test/hush-parsing/escape3.right
new file mode 100644
index 000000000..da02a976a
--- /dev/null
+++ b/shell/hush_test/hush-parsing/escape3.right
@@ -0,0 +1,23 @@
1v: a \ b \\ c \\\ d \\\\ e
2v: a \ b \\ c \\\ d \\\\ e
3Unquoted:
4.a.
5.\.
6.b.
7.\\.
8.c.
9.\\\.
10.d.
11.\\\\.
12.e.
13Quoted:
14.a.
15.\.
16.b.
17.\\.
18.c.
19.\\\.
20.d.
21.\\\\.
22.e.
23done
diff --git a/shell/hush_test/hush-parsing/escape3.tests b/shell/hush_test/hush-parsing/escape3.tests
new file mode 100755
index 000000000..111ed40a2
--- /dev/null
+++ b/shell/hush_test/hush-parsing/escape3.tests
@@ -0,0 +1,8 @@
1v='a \ b \\ c \\\ d \\\\ e'
2echo v: $v
3echo v: "$v"
4echo Unquoted:
5for a in $v; do echo .$a.; done
6echo Quoted:
7for a in $v; do echo ".$a."; done
8echo done
diff --git a/shell/hush_test/hush-parsing/redir_space.right b/shell/hush_test/hush-parsing/redir_space.right
new file mode 100644
index 000000000..084295204
--- /dev/null
+++ b/shell/hush_test/hush-parsing/redir_space.right
@@ -0,0 +1,3 @@
1z1.tmp: 1
2z2.tmp: 1
3"z1.tmp z2.tmp": TEST 0
diff --git a/shell/hush_test/hush-parsing/redir_space.tests b/shell/hush_test/hush-parsing/redir_space.tests
new file mode 100755
index 000000000..c0b543098
--- /dev/null
+++ b/shell/hush_test/hush-parsing/redir_space.tests
@@ -0,0 +1,6 @@
1v='z1.tmp z2.tmp'
2echo TEST >$v
3echo 'z1.tmp:' `cat 'z1.tmp' 2>/dev/null; echo $?`
4echo 'z2.tmp:' `cat 'z2.tmp' 2>/dev/null; echo $?`
5echo '"z1.tmp z2.tmp":' `cat 'z1.tmp z2.tmp' 2>/dev/null; echo $?`
6rm z*.tmp