diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-10-03 00:51:29 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-10-03 00:51:29 +0200 |
commit | 2feaa227a4ddbf642207beebe7ac5ce85c57f018 (patch) | |
tree | 39e469a3bbdcac9d85e0615685f90999d044266a | |
parent | 9793fc576afa25715cf75c121dbfd9da1e053b0a (diff) | |
download | busybox-w32-2feaa227a4ddbf642207beebe7ac5ce85c57f018.tar.gz busybox-w32-2feaa227a4ddbf642207beebe7ac5ce85c57f018.tar.bz2 busybox-w32-2feaa227a4ddbf642207beebe7ac5ce85c57f018.zip |
shell: delete all msh tests
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
47 files changed, 0 insertions, 356 deletions
diff --git a/shell/msh_test/msh-bugs/noeol3.right b/shell/msh_test/msh-bugs/noeol3.right deleted file mode 100644 index 56f8515b7..000000000 --- a/shell/msh_test/msh-bugs/noeol3.right +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | hush: syntax error: unterminated " | ||
diff --git a/shell/msh_test/msh-bugs/noeol3.tests b/shell/msh_test/msh-bugs/noeol3.tests deleted file mode 100755 index ec958ed7a..000000000 --- a/shell/msh_test/msh-bugs/noeol3.tests +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | # last line has no EOL! | ||
2 | echo "unterminated \ No newline at end of file | ||
diff --git a/shell/msh_test/msh-bugs/process_subst.right b/shell/msh_test/msh-bugs/process_subst.right deleted file mode 100644 index 397bc8067..000000000 --- a/shell/msh_test/msh-bugs/process_subst.right +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | TESTzzBEST | ||
2 | TEST$(echo zz)BEST | ||
3 | TEST'BEST | ||
diff --git a/shell/msh_test/msh-bugs/process_subst.tests b/shell/msh_test/msh-bugs/process_subst.tests deleted file mode 100755 index 21996bc0e..000000000 --- a/shell/msh_test/msh-bugs/process_subst.tests +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | echo "TEST`echo zz;echo;echo`BEST" | ||
2 | echo "TEST`echo '$(echo zz)'`BEST" | ||
3 | echo "TEST`echo "'"`BEST" | ||
diff --git a/shell/msh_test/msh-bugs/read.right b/shell/msh_test/msh-bugs/read.right deleted file mode 100644 index 0e50e2a23..000000000 --- a/shell/msh_test/msh-bugs/read.right +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | read | ||
2 | cat | ||
3 | echo "REPLY=$REPLY" | ||
4 | REPLY=exec <read.tests | ||
diff --git a/shell/msh_test/msh-bugs/read.tests b/shell/msh_test/msh-bugs/read.tests deleted file mode 100755 index ff1acbde1..000000000 --- a/shell/msh_test/msh-bugs/read.tests +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | exec <read.tests | ||
2 | read | ||
3 | cat | ||
4 | echo "REPLY=$REPLY" | ||
diff --git a/shell/msh_test/msh-bugs/shift.right b/shell/msh_test/msh-bugs/shift.right deleted file mode 100644 index d281e358c..000000000 --- a/shell/msh_test/msh-bugs/shift.right +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | ./shift.tests abc d e | ||
2 | ./shift.tests d e 123 | ||
3 | ./shift.tests d e 123 | ||
4 | ./shift.tests | ||
5 | ./shift.tests | ||
6 | ./shift.tests | ||
diff --git a/shell/msh_test/msh-bugs/shift.tests b/shell/msh_test/msh-bugs/shift.tests deleted file mode 100755 index 53ef249f2..000000000 --- a/shell/msh_test/msh-bugs/shift.tests +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | if test $# = 0; then | ||
2 | exec "$THIS_SH" $0 abc "d e" 123 | ||
3 | fi | ||
4 | echo $0 $1 $2 | ||
5 | shift | ||
6 | echo $0 $1 $2 | ||
7 | shift 999 | ||
8 | echo $0 $1 $2 | ||
9 | shift 2 | ||
10 | echo $0 $1 $2 | ||
11 | shift 2 | ||
12 | echo $0 $1 $2 | ||
13 | shift | ||
14 | echo $0 $1 $2 | ||
diff --git a/shell/msh_test/msh-bugs/starquoted.right b/shell/msh_test/msh-bugs/starquoted.right deleted file mode 100644 index b56323fe1..000000000 --- a/shell/msh_test/msh-bugs/starquoted.right +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | .1 abc d e f. | ||
2 | .1. | ||
3 | .abc. | ||
4 | .d e f. | ||
5 | .-1 abc d e f-. | ||
6 | .-1. | ||
7 | .abc. | ||
8 | .d e f-. | ||
diff --git a/shell/msh_test/msh-bugs/starquoted.tests b/shell/msh_test/msh-bugs/starquoted.tests deleted file mode 100755 index 2fe49b1cd..000000000 --- a/shell/msh_test/msh-bugs/starquoted.tests +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | if test $# = 0; then | ||
2 | exec "$THIS_SH" "$0" 1 abc 'd e f' | ||
3 | fi | ||
4 | |||
5 | for a in "$*"; do echo ".$a."; done | ||
6 | for a in "$@"; do echo ".$a."; done | ||
7 | for a in "-$*-"; do echo ".$a."; done | ||
8 | for a in "-$@-"; do echo ".$a."; done | ||
diff --git a/shell/msh_test/msh-bugs/syntax_err.right b/shell/msh_test/msh-bugs/syntax_err.right deleted file mode 100644 index 08a270c31..000000000 --- a/shell/msh_test/msh-bugs/syntax_err.right +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | shown | ||
2 | hush: syntax error: unterminated ' | ||
diff --git a/shell/msh_test/msh-bugs/syntax_err.tests b/shell/msh_test/msh-bugs/syntax_err.tests deleted file mode 100755 index d10ed42e9..000000000 --- a/shell/msh_test/msh-bugs/syntax_err.tests +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | echo shown | ||
2 | echo test `echo 'aa` | ||
3 | echo not shown | ||
diff --git a/shell/msh_test/msh-bugs/var_expand_in_assign.right b/shell/msh_test/msh-bugs/var_expand_in_assign.right deleted file mode 100644 index 352210d7e..000000000 --- a/shell/msh_test/msh-bugs/var_expand_in_assign.right +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | . . | ||
2 | .abc d e. | ||
3 | .abc d e. | ||
4 | .abc d e. | ||
5 | .abc d e. | ||
diff --git a/shell/msh_test/msh-bugs/var_expand_in_assign.tests b/shell/msh_test/msh-bugs/var_expand_in_assign.tests deleted file mode 100755 index 18cdc74c0..000000000 --- a/shell/msh_test/msh-bugs/var_expand_in_assign.tests +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | if test $# = 0; then | ||
2 | exec "$THIS_SH" "$0" abc "d e" | ||
3 | fi | ||
4 | |||
5 | space=' ' | ||
6 | echo .$space. | ||
7 | |||
8 | a=$* | ||
9 | echo .$a. | ||
10 | a=$@ | ||
11 | echo .$a. | ||
12 | a="$*" | ||
13 | echo .$a. | ||
14 | a="$@" | ||
15 | echo .$a. | ||
diff --git a/shell/msh_test/msh-bugs/var_expand_in_redir.right b/shell/msh_test/msh-bugs/var_expand_in_redir.right deleted file mode 100644 index 423299c97..000000000 --- a/shell/msh_test/msh-bugs/var_expand_in_redir.right +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | TEST1 | ||
2 | TEST2 | ||
3 | TEST3 | ||
diff --git a/shell/msh_test/msh-bugs/var_expand_in_redir.tests b/shell/msh_test/msh-bugs/var_expand_in_redir.tests deleted file mode 100755 index bda6bdd7f..000000000 --- a/shell/msh_test/msh-bugs/var_expand_in_redir.tests +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | if test $# = 0; then | ||
2 | exec "$THIS_SH" "$0" abc "d e" | ||
3 | fi | ||
4 | |||
5 | echo TEST1 >"$1.out" | ||
6 | echo TEST2 >"$2.out" | ||
7 | # bash says: "$@.out": ambiguous redirect | ||
8 | # ash handles it as if it is '$*' - we do the same | ||
9 | echo TEST3 >"$@.out" | ||
10 | |||
11 | cat abc.out "d e.out" "abc d e.out" | ||
12 | |||
13 | rm abc.out "d e.out" "abc d e.out" | ||
diff --git a/shell/msh_test/msh-execution/exitcode_EACCES.right b/shell/msh_test/msh-execution/exitcode_EACCES.right deleted file mode 100644 index 6e5480b9d..000000000 --- a/shell/msh_test/msh-execution/exitcode_EACCES.right +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | ./: can't execute | ||
2 | 126 | ||
diff --git a/shell/msh_test/msh-execution/exitcode_EACCES.tests b/shell/msh_test/msh-execution/exitcode_EACCES.tests deleted file mode 100755 index 26b5c6116..000000000 --- a/shell/msh_test/msh-execution/exitcode_EACCES.tests +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | ./ | ||
2 | echo $? | ||
diff --git a/shell/msh_test/msh-execution/exitcode_ENOENT.right b/shell/msh_test/msh-execution/exitcode_ENOENT.right deleted file mode 100644 index dd49d2c0c..000000000 --- a/shell/msh_test/msh-execution/exitcode_ENOENT.right +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | ./does_not_exist_for_sure: not found | ||
2 | 127 | ||
diff --git a/shell/msh_test/msh-execution/exitcode_ENOENT.tests b/shell/msh_test/msh-execution/exitcode_ENOENT.tests deleted file mode 100755 index 7f1b88a99..000000000 --- a/shell/msh_test/msh-execution/exitcode_ENOENT.tests +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | ./does_not_exist_for_sure | ||
2 | echo $? | ||
diff --git a/shell/msh_test/msh-execution/many_continues.right b/shell/msh_test/msh-execution/many_continues.right deleted file mode 100644 index d86bac9de..000000000 --- a/shell/msh_test/msh-execution/many_continues.right +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | OK | ||
diff --git a/shell/msh_test/msh-execution/many_continues.tests b/shell/msh_test/msh-execution/many_continues.tests deleted file mode 100755 index 86c729abc..000000000 --- a/shell/msh_test/msh-execution/many_continues.tests +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | if test $# = 0; then | ||
2 | # Child will kill us in 1 second | ||
3 | "$THIS_SH" "$0" $$ & | ||
4 | |||
5 | # Loop many, many times | ||
6 | trap 'echo OK; exit 0' 15 | ||
7 | while true; do | ||
8 | continue | ||
9 | done | ||
10 | echo BAD | ||
11 | exit 1 | ||
12 | fi | ||
13 | |||
14 | sleep 1 | ||
15 | kill $1 | ||
diff --git a/shell/msh_test/msh-execution/nested_break.right b/shell/msh_test/msh-execution/nested_break.right deleted file mode 100644 index 4e8b6b0f2..000000000 --- a/shell/msh_test/msh-execution/nested_break.right +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | A | ||
2 | B | ||
3 | iteration | ||
4 | C | ||
5 | A | ||
6 | B | ||
7 | iteration | ||
8 | D | ||
diff --git a/shell/msh_test/msh-execution/nested_break.tests b/shell/msh_test/msh-execution/nested_break.tests deleted file mode 100755 index 1a954d227..000000000 --- a/shell/msh_test/msh-execution/nested_break.tests +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | # Testcase for http://bugs.busybox.net/view.php?id=846 | ||
2 | |||
3 | n=0 | ||
4 | while : | ||
5 | do | ||
6 | echo A | ||
7 | while : | ||
8 | do | ||
9 | echo B | ||
10 | break | ||
11 | done | ||
12 | echo iteration | ||
13 | [ $n = 1 ] && break | ||
14 | echo C | ||
15 | n=`expr $n + 1` | ||
16 | done | ||
17 | echo D | ||
diff --git a/shell/msh_test/msh-misc/tick.right b/shell/msh_test/msh-misc/tick.right deleted file mode 100644 index 6ed281c75..000000000 --- a/shell/msh_test/msh-misc/tick.right +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | 1 | ||
2 | 1 | ||
diff --git a/shell/msh_test/msh-misc/tick.tests b/shell/msh_test/msh-misc/tick.tests deleted file mode 100755 index 1f749a9cd..000000000 --- a/shell/msh_test/msh-misc/tick.tests +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | true | ||
2 | false; echo `echo $?` | ||
3 | true | ||
4 | { false; echo `echo $?`; } | ||
diff --git a/shell/msh_test/msh-parsing/argv0.right b/shell/msh_test/msh-parsing/argv0.right deleted file mode 100644 index d86bac9de..000000000 --- a/shell/msh_test/msh-parsing/argv0.right +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | OK | ||
diff --git a/shell/msh_test/msh-parsing/argv0.tests b/shell/msh_test/msh-parsing/argv0.tests deleted file mode 100755 index f5c40f6fe..000000000 --- a/shell/msh_test/msh-parsing/argv0.tests +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | if test $# = 0; then | ||
2 | exec "$THIS_SH" "$0" arg | ||
3 | fi | ||
4 | echo OK | ||
diff --git a/shell/msh_test/msh-parsing/noeol.right b/shell/msh_test/msh-parsing/noeol.right deleted file mode 100644 index e427984d4..000000000 --- a/shell/msh_test/msh-parsing/noeol.right +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | HELLO | ||
diff --git a/shell/msh_test/msh-parsing/noeol.tests b/shell/msh_test/msh-parsing/noeol.tests deleted file mode 100755 index a93113a03..000000000 --- a/shell/msh_test/msh-parsing/noeol.tests +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | # next line has no EOL! | ||
2 | echo HELLO \ No newline at end of file | ||
diff --git a/shell/msh_test/msh-parsing/noeol2.right b/shell/msh_test/msh-parsing/noeol2.right deleted file mode 100644 index d00491fd7..000000000 --- a/shell/msh_test/msh-parsing/noeol2.right +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | 1 | ||
diff --git a/shell/msh_test/msh-parsing/noeol2.tests b/shell/msh_test/msh-parsing/noeol2.tests deleted file mode 100755 index 1220f056f..000000000 --- a/shell/msh_test/msh-parsing/noeol2.tests +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | # last line has no EOL! | ||
2 | if true | ||
3 | then | ||
4 | echo 1 | ||
5 | else | ||
6 | echo 2 | ||
7 | fi \ No newline at end of file | ||
diff --git a/shell/msh_test/msh-parsing/quote1.right b/shell/msh_test/msh-parsing/quote1.right deleted file mode 100644 index cb382054c..000000000 --- a/shell/msh_test/msh-parsing/quote1.right +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | '1' | ||
diff --git a/shell/msh_test/msh-parsing/quote1.tests b/shell/msh_test/msh-parsing/quote1.tests deleted file mode 100755 index f55895466..000000000 --- a/shell/msh_test/msh-parsing/quote1.tests +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | a=1 | ||
2 | echo "'$a'" | ||
diff --git a/shell/msh_test/msh-parsing/quote2.right b/shell/msh_test/msh-parsing/quote2.right deleted file mode 100644 index 3bc9edcd6..000000000 --- a/shell/msh_test/msh-parsing/quote2.right +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | >1 | ||
diff --git a/shell/msh_test/msh-parsing/quote2.tests b/shell/msh_test/msh-parsing/quote2.tests deleted file mode 100755 index bd966f30b..000000000 --- a/shell/msh_test/msh-parsing/quote2.tests +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | a=1 | ||
2 | echo ">$a" | ||
diff --git a/shell/msh_test/msh-parsing/quote3.right b/shell/msh_test/msh-parsing/quote3.right deleted file mode 100644 index 069a46e8f..000000000 --- a/shell/msh_test/msh-parsing/quote3.right +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | Testing: in $empty"" | ||
2 | .. | ||
3 | Finished | ||
diff --git a/shell/msh_test/msh-parsing/quote3.tests b/shell/msh_test/msh-parsing/quote3.tests deleted file mode 100755 index 075e78570..000000000 --- a/shell/msh_test/msh-parsing/quote3.tests +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | if test $# = 0; then | ||
2 | exec "$THIS_SH" quote3.tests abc "d e" | ||
3 | fi | ||
4 | |||
5 | echo 'Testing: in $empty""' | ||
6 | empty='' | ||
7 | for a in $empty""; do echo ".$a."; done | ||
8 | echo Finished | ||
diff --git a/shell/msh_test/msh-parsing/quote4.right b/shell/msh_test/msh-parsing/quote4.right deleted file mode 100644 index b2901ea97..000000000 --- a/shell/msh_test/msh-parsing/quote4.right +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | a b | ||
diff --git a/shell/msh_test/msh-parsing/quote4.tests b/shell/msh_test/msh-parsing/quote4.tests deleted file mode 100755 index f1dabfa54..000000000 --- a/shell/msh_test/msh-parsing/quote4.tests +++ /dev/null | |||
@@ -1,2 +0,0 @@ | |||
1 | a_b='a b' | ||
2 | echo "$a_b" | ||
diff --git a/shell/msh_test/msh-vars/star.right b/shell/msh_test/msh-vars/star.right deleted file mode 100644 index 0ecc55bc2..000000000 --- a/shell/msh_test/msh-vars/star.right +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | .1. | ||
2 | .abc. | ||
3 | .d. | ||
4 | .e. | ||
5 | .f. | ||
6 | .1 abc d e f. | ||
diff --git a/shell/msh_test/msh-vars/star.tests b/shell/msh_test/msh-vars/star.tests deleted file mode 100755 index 5554c4090..000000000 --- a/shell/msh_test/msh-vars/star.tests +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | if test $# = 0; then | ||
2 | exec "$THIS_SH" star.tests 1 abc 'd e f' | ||
3 | fi | ||
4 | # 'd e f' should be split into 3 separate args: | ||
5 | for a in $*; do echo ".$a."; done | ||
6 | |||
7 | # must produce .1 abc d e f. | ||
8 | for a in "$*"; do echo ".$a."; done | ||
diff --git a/shell/msh_test/msh-vars/var.right b/shell/msh_test/msh-vars/var.right deleted file mode 100644 index 14b2314d9..000000000 --- a/shell/msh_test/msh-vars/var.right +++ /dev/null | |||
@@ -1,4 +0,0 @@ | |||
1 | http://busybox.net | ||
2 | http://busybox.net_abc | ||
3 | 1 | ||
4 | 1 | ||
diff --git a/shell/msh_test/msh-vars/var.tests b/shell/msh_test/msh-vars/var.tests deleted file mode 100755 index 0a63696c9..000000000 --- a/shell/msh_test/msh-vars/var.tests +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | URL=http://busybox.net | ||
2 | |||
3 | echo $URL | ||
4 | echo ${URL}_abc | ||
5 | |||
6 | true | ||
7 | false; echo $? | ||
8 | true | ||
9 | { false; echo $?; } | ||
diff --git a/shell/msh_test/msh-vars/var_subst_in_for.right b/shell/msh_test/msh-vars/var_subst_in_for.right deleted file mode 100644 index c8aca1c12..000000000 --- a/shell/msh_test/msh-vars/var_subst_in_for.right +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | Testing: in x y z | ||
2 | .x. | ||
3 | .y. | ||
4 | .z. | ||
5 | Testing: in u $empty v | ||
6 | .u. | ||
7 | .v. | ||
8 | Testing: in u " $empty" v | ||
9 | .u. | ||
10 | . . | ||
11 | .v. | ||
12 | Testing: in u $empty $empty$a v | ||
13 | .u. | ||
14 | .a. | ||
15 | .v. | ||
16 | Testing: in $a_b | ||
17 | .a. | ||
18 | .b. | ||
19 | Testing: in $* | ||
20 | .abc. | ||
21 | .d. | ||
22 | .e. | ||
23 | Testing: in $@ | ||
24 | .abc. | ||
25 | .d. | ||
26 | .e. | ||
27 | Testing: in -$*- | ||
28 | .-abc. | ||
29 | .d. | ||
30 | .e-. | ||
31 | Testing: in -$@- | ||
32 | .-abc. | ||
33 | .d. | ||
34 | .e-. | ||
35 | Testing: in $a_b -$a_b- | ||
36 | .a. | ||
37 | .b. | ||
38 | .-a. | ||
39 | .b-. | ||
40 | Finished | ||
diff --git a/shell/msh_test/msh-vars/var_subst_in_for.tests b/shell/msh_test/msh-vars/var_subst_in_for.tests deleted file mode 100755 index 4d1c11201..000000000 --- a/shell/msh_test/msh-vars/var_subst_in_for.tests +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | if test $# = 0; then | ||
2 | exec "$THIS_SH" var_subst_in_for.tests abc "d e" | ||
3 | fi | ||
4 | |||
5 | echo 'Testing: in x y z' | ||
6 | for a in x y z; do echo ".$a."; done | ||
7 | |||
8 | echo 'Testing: in u $empty v' | ||
9 | empty='' | ||
10 | for a in u $empty v; do echo ".$a."; done | ||
11 | |||
12 | echo 'Testing: in u " $empty" v' | ||
13 | empty='' | ||
14 | for a in u " $empty" v; do echo ".$a."; done | ||
15 | |||
16 | echo 'Testing: in u $empty $empty$a v' | ||
17 | a='a' | ||
18 | for a in u $empty $empty$a v; do echo ".$a."; done | ||
19 | |||
20 | echo 'Testing: in $a_b' | ||
21 | a_b='a b' | ||
22 | for a in $a_b; do echo ".$a."; done | ||
23 | |||
24 | echo 'Testing: in $*' | ||
25 | for a in $*; do echo ".$a."; done | ||
26 | |||
27 | echo 'Testing: in $@' | ||
28 | for a in $@; do echo ".$a."; done | ||
29 | |||
30 | echo 'Testing: in -$*-' | ||
31 | for a in -$*-; do echo ".$a."; done | ||
32 | |||
33 | echo 'Testing: in -$@-' | ||
34 | for a in -$@-; do echo ".$a."; done | ||
35 | |||
36 | echo 'Testing: in $a_b -$a_b-' | ||
37 | a_b='a b' | ||
38 | for a in $a_b -$a_b-; do echo ".$a."; done | ||
39 | |||
40 | echo Finished | ||
diff --git a/shell/msh_test/run-all b/shell/msh_test/run-all deleted file mode 100755 index 29f62a5e2..000000000 --- a/shell/msh_test/run-all +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | test -x msh || { | ||
4 | echo "No ./msh - creating a link to ../../busybox" | ||
5 | ln -s ../../busybox msh | ||
6 | } | ||
7 | |||
8 | PATH="$PWD:$PATH" # for msh | ||
9 | export PATH | ||
10 | |||
11 | THIS_SH="$PWD/msh" | ||
12 | export THIS_SH | ||
13 | |||
14 | do_test() | ||
15 | { | ||
16 | test -d "$1" || return 0 | ||
17 | # echo Running tests in directory "$1" | ||
18 | ( | ||
19 | cd "$1" || { echo "cannot cd $1!"; exit 1; } | ||
20 | for x in run-*; do | ||
21 | test -f "$x" || continue | ||
22 | case "$x" in | ||
23 | "$0"|run-minimal|run-gprof) ;; | ||
24 | *.orig|*~) ;; | ||
25 | #*) echo $x ; sh $x ;; | ||
26 | *) | ||
27 | sh "$x" >"../$1-$x.fail" 2>&1 && \ | ||
28 | { echo "$1/$x: ok"; rm "../$1-$x.fail"; } || echo "$1/$x: fail"; | ||
29 | ;; | ||
30 | esac | ||
31 | done | ||
32 | # Many bash run-XXX scripts just do this, | ||
33 | # no point in duplication it all over the place | ||
34 | for x in *.tests; do | ||
35 | test -x "$x" || continue | ||
36 | name="${x%%.tests}" | ||
37 | test -f "$name.right" || continue | ||
38 | # echo Running test: "$name.right" | ||
39 | { | ||
40 | "$THIS_SH" "./$x" >"$name.xx" 2>&1 | ||
41 | diff -u "$name.xx" "$name.right" >"../$1-$x.fail" && rm -f "$name.xx" "../$1-$x.fail" | ||
42 | } && echo "$1/$x: ok" || echo "$1/$x: fail" | ||
43 | done | ||
44 | ) | ||
45 | } | ||
46 | |||
47 | # Main part of this script | ||
48 | # Usage: run-all [directories] | ||
49 | |||
50 | if [ $# -lt 1 ]; then | ||
51 | # All sub directories | ||
52 | modules=`ls -d msh-*` | ||
53 | |||
54 | for module in $modules; do | ||
55 | do_test $module | ||
56 | done | ||
57 | else | ||
58 | while [ $# -ge 1 ]; do | ||
59 | if [ -d $1 ]; then | ||
60 | do_test $1 | ||
61 | fi | ||
62 | shift | ||
63 | done | ||
64 | fi | ||