summaryrefslogtreecommitdiff
path: root/release/src/router/busybox/shell/hush_test/hush-misc/redir4.tests
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2015-01-03 13:58:15 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2015-01-03 13:58:15 +0100
commit4aca87515a5083ae0e31ce3177189fd43b6d05ac (patch)
tree7b1d9a31393ca090757dc6f0d3859b4fcd93f271 /release/src/router/busybox/shell/hush_test/hush-misc/redir4.tests
parent008d0be72b2f160382c6e880765e96b64a050c65 (diff)
downloadtomato-4aca87515a5083ae0e31ce3177189fd43b6d05ac.tar.gz
tomato-4aca87515a5083ae0e31ce3177189fd43b6d05ac.tar.bz2
patch to Vanilla Tomato 1.28
Diffstat (limited to 'release/src/router/busybox/shell/hush_test/hush-misc/redir4.tests')
-rwxr-xr-xrelease/src/router/busybox/shell/hush_test/hush-misc/redir4.tests85
1 files changed, 85 insertions, 0 deletions
diff --git a/release/src/router/busybox/shell/hush_test/hush-misc/redir4.tests b/release/src/router/busybox/shell/hush_test/hush-misc/redir4.tests
new file mode 100755
index 00000000..c50b8ced
--- /dev/null
+++ b/release/src/router/busybox/shell/hush_test/hush-misc/redir4.tests
@@ -0,0 +1,85 @@
+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 Now 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*
+
+echo Done;exit
+# UNFIXED BUG. bash apparently will expand $i even in terminating delimiter.
+# http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
+# does not mandate this behavior.
+# This is not likely to be used much in real-world.
+
+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