diff options
Diffstat (limited to 'shell/hush_test/hush-misc/redir4.tests')
-rwxr-xr-x | shell/hush_test/hush-misc/redir4.tests | 80 |
1 files changed, 80 insertions, 0 deletions
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 | ||