diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-10 00:20:58 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-10 00:20:58 +0000 |
commit | c96865f4458f357df41eeea73d456e15755b51f4 (patch) | |
tree | 2ff83e9aa8062a05aea94c9b576af5f5c8870b55 /shell/hush_test | |
parent | e05f9286a943eb74bdcdead86c016e6c8cc5c082 (diff) | |
download | busybox-w32-c96865f4458f357df41eeea73d456e15755b51f4.tar.gz busybox-w32-c96865f4458f357df41eeea73d456e15755b51f4.tar.bz2 busybox-w32-c96865f4458f357df41eeea73d456e15755b51f4.zip |
hush: readability improvements.
fix some more obscure bugs.
a new redir4.tests is known to fail.
Diffstat (limited to 'shell/hush_test')
-rw-r--r-- | shell/hush_test/hush-misc/redir1.right | 2 | ||||
-rwxr-xr-x | shell/hush_test/hush-misc/redir1.tests | 6 | ||||
-rw-r--r-- | shell/hush_test/hush-misc/redir4.right | 25 | ||||
-rwxr-xr-x | shell/hush_test/hush-misc/redir4.tests | 80 |
4 files changed, 113 insertions, 0 deletions
diff --git a/shell/hush_test/hush-misc/redir1.right b/shell/hush_test/hush-misc/redir1.right index ac90b4a0a..15515d1af 100644 --- a/shell/hush_test/hush-misc/redir1.right +++ b/shell/hush_test/hush-misc/redir1.right | |||
@@ -1,3 +1,5 @@ | |||
1 | Test 0: var:ok | ||
2 | File created:ok | ||
1 | Test 1: var:ok | 3 | Test 1: var:ok |
2 | File created:ok | 4 | File created:ok |
3 | Test 2: var:ok | 5 | Test 2: var:ok |
diff --git a/shell/hush_test/hush-misc/redir1.tests b/shell/hush_test/hush-misc/redir1.tests index 7e204514c..70e9e17f0 100755 --- a/shell/hush_test/hush-misc/redir1.tests +++ b/shell/hush_test/hush-misc/redir1.tests | |||
@@ -1,5 +1,11 @@ | |||
1 | rm shell_test_$$ 2>/dev/null | 1 | rm shell_test_$$ 2>/dev/null |
2 | var=bad | 2 | var=bad |
3 | >shell_test_$$ var=ok | ||
4 | echo "Test 0: var:$var" | ||
5 | test -f shell_test_$$ && echo "File created:ok" | ||
6 | |||
7 | rm shell_test_$$ 2>/dev/null | ||
8 | var=bad | ||
3 | var=ok >shell_test_$$ | 9 | var=ok >shell_test_$$ |
4 | echo "Test 1: var:$var" | 10 | echo "Test 1: var:$var" |
5 | test -f shell_test_$$ && echo "File created:ok" | 11 | test -f shell_test_$$ && echo "File created:ok" |
diff --git a/shell/hush_test/hush-misc/redir4.right b/shell/hush_test/hush-misc/redir4.right new file mode 100644 index 000000000..ada6c2d85 --- /dev/null +++ b/shell/hush_test/hush-misc/redir4.right | |||
@@ -0,0 +1,25 @@ | |||
1 | shell_test | ||
2 | \shell_test | ||
3 | \shell_test | ||
4 | \shell_test | ||
5 | Here1 | ||
6 | Ok1 | ||
7 | Here2 | ||
8 | Ok2 | ||
9 | Here3 | ||
10 | Ok3 | ||
11 | Here4 | ||
12 | Ok4 | ||
13 | How with variable refs | ||
14 | shell_test_1 | ||
15 | \shell_test_1 | ||
16 | \shell_test_1 | ||
17 | \shell_test_1 | ||
18 | Here1 | ||
19 | Ok1 | ||
20 | Here2 | ||
21 | Ok2 | ||
22 | Here3 | ||
23 | Ok3 | ||
24 | Here4 | ||
25 | Ok4 | ||
diff --git a/shell/hush_test/hush-misc/redir4.tests b/shell/hush_test/hush-misc/redir4.tests new file mode 100755 index 000000000..ac2a44166 --- /dev/null +++ b/shell/hush_test/hush-misc/redir4.tests | |||
@@ -0,0 +1,80 @@ | |||
1 | rm *shell_test* 2>/dev/null | ||
2 | |||
3 | >\shell_test | ||
4 | echo *shell_test* | ||
5 | rm *shell_test* | ||
6 | |||
7 | >\\shell_test | ||
8 | echo *shell_test* | ||
9 | rm *shell_test* | ||
10 | |||
11 | >"\shell_test" | ||
12 | echo *shell_test* | ||
13 | rm *shell_test* | ||
14 | |||
15 | >"\\shell_test" | ||
16 | echo *shell_test* | ||
17 | rm *shell_test* | ||
18 | |||
19 | |||
20 | cat <<\shell_test | ||
21 | Here1 | ||
22 | shell_test | ||
23 | echo Ok1 | ||
24 | |||
25 | cat <<\\shell_test | ||
26 | Here2 | ||
27 | \shell_test | ||
28 | echo Ok2 | ||
29 | |||
30 | cat <<"\shell_test" | ||
31 | Here3 | ||
32 | \shell_test | ||
33 | echo Ok3 | ||
34 | |||
35 | cat <<"\\shell_test" | ||
36 | Here4 | ||
37 | \shell_test | ||
38 | echo Ok4 | ||
39 | |||
40 | |||
41 | echo How with variable refs | ||
42 | i=1 | ||
43 | |||
44 | |||
45 | >\shell_test_$i | ||
46 | echo *shell_test* | ||
47 | rm *shell_test* | ||
48 | |||
49 | >\\shell_test_$i | ||
50 | echo *shell_test* | ||
51 | rm *shell_test* | ||
52 | |||
53 | >"\shell_test_$i" | ||
54 | echo *shell_test* | ||
55 | rm *shell_test* | ||
56 | |||
57 | >"\\shell_test_$i" | ||
58 | echo *shell_test* | ||
59 | rm *shell_test* | ||
60 | |||
61 | |||
62 | cat <<\shell_test_$i | ||
63 | Here1 | ||
64 | shell_test_$i | ||
65 | echo Ok1 | ||
66 | |||
67 | cat <<\\shell_test_$i | ||
68 | Here2 | ||
69 | \shell_test_$i | ||
70 | echo Ok2 | ||
71 | |||
72 | cat <<"\shell_test_$i" | ||
73 | Here3 | ||
74 | \shell_test_$i | ||
75 | echo Ok3 | ||
76 | |||
77 | cat <<"\\shell_test_$i" | ||
78 | Here4 | ||
79 | \shell_test_$i | ||
80 | echo Ok4 | ||