aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test/hush-misc/redir4.tests
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-04-10 00:20:58 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-04-10 00:20:58 +0000
commitc96865f4458f357df41eeea73d456e15755b51f4 (patch)
tree2ff83e9aa8062a05aea94c9b576af5f5c8870b55 /shell/hush_test/hush-misc/redir4.tests
parente05f9286a943eb74bdcdead86c016e6c8cc5c082 (diff)
downloadbusybox-c96865f4458f357df41eeea73d456e15755b51f4.tar.gz
hush: readability improvements.
fix some more obscure bugs. a new redir4.tests is known to fail.
Diffstat (limited to 'shell/hush_test/hush-misc/redir4.tests')
-rwxr-xr-xshell/hush_test/hush-misc/redir4.tests80
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 @@
+rm *shell_test* 2>/dev/null
+
+>\shell_test
+echo *shell_test*
+rm *shell_test*
+
+>\\shell_test
+echo *shell_test*
+rm *shell_test*
+
+>"\shell_test"
+echo *shell_test*
+rm *shell_test*
+
+>"\\shell_test"
+echo *shell_test*
+rm *shell_test*
+
+
+cat <<\shell_test
+Here1
+shell_test
+echo Ok1
+
+cat <<\\shell_test
+Here2
+\shell_test
+echo Ok2
+
+cat <<"\shell_test"
+Here3
+\shell_test
+echo Ok3
+
+cat <<"\\shell_test"
+Here4
+\shell_test
+echo Ok4
+
+
+echo How with variable refs
+i=1
+
+
+>\shell_test_$i
+echo *shell_test*
+rm *shell_test*
+
+>\\shell_test_$i
+echo *shell_test*
+rm *shell_test*
+
+>"\shell_test_$i"
+echo *shell_test*
+rm *shell_test*
+
+>"\\shell_test_$i"
+echo *shell_test*
+rm *shell_test*
+
+
+cat <<\shell_test_$i
+Here1
+shell_test_$i
+echo Ok1
+
+cat <<\\shell_test_$i
+Here2
+\shell_test_$i
+echo Ok2
+
+cat <<"\shell_test_$i"
+Here3
+\shell_test_$i
+echo Ok3
+
+cat <<"\\shell_test_$i"
+Here4
+\shell_test_$i
+echo Ok4