diff options
author | Denis Vlasenko | 2009-04-10 00:20:58 +0000 |
---|---|---|
committer | Denis Vlasenko | 2009-04-10 00:20:58 +0000 |
commit | c96865f4458f357df41eeea73d456e15755b51f4 (patch) | |
tree | 2ff83e9aa8062a05aea94c9b576af5f5c8870b55 /shell/hush_test/hush-misc | |
parent | e05f9286a943eb74bdcdead86c016e6c8cc5c082 (diff) | |
download | busybox-c96865f4458f357df41eeea73d456e15755b51f4.zip busybox-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')
-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 ac90b4a..15515d1 100644 --- a/shell/hush_test/hush-misc/redir1.right +++ b/shell/hush_test/hush-misc/redir1.right @@ -1,3 +1,5 @@ +Test 0: var:ok +File created:ok Test 1: var:ok File created:ok Test 2: var:ok diff --git a/shell/hush_test/hush-misc/redir1.tests b/shell/hush_test/hush-misc/redir1.tests index 7e20451..70e9e17 100755 --- a/shell/hush_test/hush-misc/redir1.tests +++ b/shell/hush_test/hush-misc/redir1.tests @@ -1,5 +1,11 @@ rm shell_test_$$ 2>/dev/null var=bad +>shell_test_$$ var=ok +echo "Test 0: var:$var" +test -f shell_test_$$ && echo "File created:ok" + +rm shell_test_$$ 2>/dev/null +var=bad var=ok >shell_test_$$ echo "Test 1: var:$var" 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 0000000..ada6c2d --- /dev/null +++ b/shell/hush_test/hush-misc/redir4.right @@ -0,0 +1,25 @@ +shell_test +\shell_test +\shell_test +\shell_test +Here1 +Ok1 +Here2 +Ok2 +Here3 +Ok3 +Here4 +Ok4 +How with variable refs +shell_test_1 +\shell_test_1 +\shell_test_1 +\shell_test_1 +Here1 +Ok1 +Here2 +Ok2 +Here3 +Ok3 +Here4 +Ok4 diff --git a/shell/hush_test/hush-misc/redir4.tests b/shell/hush_test/hush-misc/redir4.tests new file mode 100755 index 0000000..ac2a441 --- /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 |