diff options
Diffstat (limited to 'release/src/router/busybox/shell/msh_test/msh-bugs')
16 files changed, 94 insertions, 0 deletions
diff --git a/release/src/router/busybox/shell/msh_test/msh-bugs/noeol3.right b/release/src/router/busybox/shell/msh_test/msh-bugs/noeol3.right new file mode 100644 index 00000000..56f8515b --- /dev/null +++ b/release/src/router/busybox/shell/msh_test/msh-bugs/noeol3.right @@ -0,0 +1 @@ +hush: syntax error: unterminated " diff --git a/release/src/router/busybox/shell/msh_test/msh-bugs/noeol3.tests b/release/src/router/busybox/shell/msh_test/msh-bugs/noeol3.tests new file mode 100755 index 00000000..ec958ed7 --- /dev/null +++ b/release/src/router/busybox/shell/msh_test/msh-bugs/noeol3.tests @@ -0,0 +1,2 @@ +# last line has no EOL! +echo "unterminated
\ No newline at end of file diff --git a/release/src/router/busybox/shell/msh_test/msh-bugs/process_subst.right b/release/src/router/busybox/shell/msh_test/msh-bugs/process_subst.right new file mode 100644 index 00000000..397bc806 --- /dev/null +++ b/release/src/router/busybox/shell/msh_test/msh-bugs/process_subst.right @@ -0,0 +1,3 @@ +TESTzzBEST +TEST$(echo zz)BEST +TEST'BEST diff --git a/release/src/router/busybox/shell/msh_test/msh-bugs/process_subst.tests b/release/src/router/busybox/shell/msh_test/msh-bugs/process_subst.tests new file mode 100755 index 00000000..21996bc0 --- /dev/null +++ b/release/src/router/busybox/shell/msh_test/msh-bugs/process_subst.tests @@ -0,0 +1,3 @@ +echo "TEST`echo zz;echo;echo`BEST" +echo "TEST`echo '$(echo zz)'`BEST" +echo "TEST`echo "'"`BEST" diff --git a/release/src/router/busybox/shell/msh_test/msh-bugs/read.right b/release/src/router/busybox/shell/msh_test/msh-bugs/read.right new file mode 100644 index 00000000..0e50e2a2 --- /dev/null +++ b/release/src/router/busybox/shell/msh_test/msh-bugs/read.right @@ -0,0 +1,4 @@ +read +cat +echo "REPLY=$REPLY" +REPLY=exec <read.tests diff --git a/release/src/router/busybox/shell/msh_test/msh-bugs/read.tests b/release/src/router/busybox/shell/msh_test/msh-bugs/read.tests new file mode 100755 index 00000000..ff1acbde --- /dev/null +++ b/release/src/router/busybox/shell/msh_test/msh-bugs/read.tests @@ -0,0 +1,4 @@ +exec <read.tests +read +cat +echo "REPLY=$REPLY" diff --git a/release/src/router/busybox/shell/msh_test/msh-bugs/shift.right b/release/src/router/busybox/shell/msh_test/msh-bugs/shift.right new file mode 100644 index 00000000..d281e358 --- /dev/null +++ b/release/src/router/busybox/shell/msh_test/msh-bugs/shift.right @@ -0,0 +1,6 @@ +./shift.tests abc d e +./shift.tests d e 123 +./shift.tests d e 123 +./shift.tests +./shift.tests +./shift.tests diff --git a/release/src/router/busybox/shell/msh_test/msh-bugs/shift.tests b/release/src/router/busybox/shell/msh_test/msh-bugs/shift.tests new file mode 100755 index 00000000..53ef249f --- /dev/null +++ b/release/src/router/busybox/shell/msh_test/msh-bugs/shift.tests @@ -0,0 +1,14 @@ +if test $# = 0; then + exec "$THIS_SH" $0 abc "d e" 123 +fi +echo $0 $1 $2 +shift +echo $0 $1 $2 +shift 999 +echo $0 $1 $2 +shift 2 +echo $0 $1 $2 +shift 2 +echo $0 $1 $2 +shift +echo $0 $1 $2 diff --git a/release/src/router/busybox/shell/msh_test/msh-bugs/starquoted.right b/release/src/router/busybox/shell/msh_test/msh-bugs/starquoted.right new file mode 100644 index 00000000..b56323fe --- /dev/null +++ b/release/src/router/busybox/shell/msh_test/msh-bugs/starquoted.right @@ -0,0 +1,8 @@ +.1 abc d e f. +.1. +.abc. +.d e f. +.-1 abc d e f-. +.-1. +.abc. +.d e f-. diff --git a/release/src/router/busybox/shell/msh_test/msh-bugs/starquoted.tests b/release/src/router/busybox/shell/msh_test/msh-bugs/starquoted.tests new file mode 100755 index 00000000..2fe49b1c --- /dev/null +++ b/release/src/router/busybox/shell/msh_test/msh-bugs/starquoted.tests @@ -0,0 +1,8 @@ +if test $# = 0; then + exec "$THIS_SH" "$0" 1 abc 'd e f' +fi + +for a in "$*"; do echo ".$a."; done +for a in "$@"; do echo ".$a."; done +for a in "-$*-"; do echo ".$a."; done +for a in "-$@-"; do echo ".$a."; done diff --git a/release/src/router/busybox/shell/msh_test/msh-bugs/syntax_err.right b/release/src/router/busybox/shell/msh_test/msh-bugs/syntax_err.right new file mode 100644 index 00000000..08a270c3 --- /dev/null +++ b/release/src/router/busybox/shell/msh_test/msh-bugs/syntax_err.right @@ -0,0 +1,2 @@ +shown +hush: syntax error: unterminated ' diff --git a/release/src/router/busybox/shell/msh_test/msh-bugs/syntax_err.tests b/release/src/router/busybox/shell/msh_test/msh-bugs/syntax_err.tests new file mode 100755 index 00000000..d10ed42e --- /dev/null +++ b/release/src/router/busybox/shell/msh_test/msh-bugs/syntax_err.tests @@ -0,0 +1,3 @@ +echo shown +echo test `echo 'aa` +echo not shown diff --git a/release/src/router/busybox/shell/msh_test/msh-bugs/var_expand_in_assign.right b/release/src/router/busybox/shell/msh_test/msh-bugs/var_expand_in_assign.right new file mode 100644 index 00000000..352210d7 --- /dev/null +++ b/release/src/router/busybox/shell/msh_test/msh-bugs/var_expand_in_assign.right @@ -0,0 +1,5 @@ +. . +.abc d e. +.abc d e. +.abc d e. +.abc d e. diff --git a/release/src/router/busybox/shell/msh_test/msh-bugs/var_expand_in_assign.tests b/release/src/router/busybox/shell/msh_test/msh-bugs/var_expand_in_assign.tests new file mode 100755 index 00000000..18cdc74c --- /dev/null +++ b/release/src/router/busybox/shell/msh_test/msh-bugs/var_expand_in_assign.tests @@ -0,0 +1,15 @@ +if test $# = 0; then + exec "$THIS_SH" "$0" abc "d e" +fi + +space=' ' +echo .$space. + +a=$* +echo .$a. +a=$@ +echo .$a. +a="$*" +echo .$a. +a="$@" +echo .$a. diff --git a/release/src/router/busybox/shell/msh_test/msh-bugs/var_expand_in_redir.right b/release/src/router/busybox/shell/msh_test/msh-bugs/var_expand_in_redir.right new file mode 100644 index 00000000..423299c9 --- /dev/null +++ b/release/src/router/busybox/shell/msh_test/msh-bugs/var_expand_in_redir.right @@ -0,0 +1,3 @@ +TEST1 +TEST2 +TEST3 diff --git a/release/src/router/busybox/shell/msh_test/msh-bugs/var_expand_in_redir.tests b/release/src/router/busybox/shell/msh_test/msh-bugs/var_expand_in_redir.tests new file mode 100755 index 00000000..bda6bdd7 --- /dev/null +++ b/release/src/router/busybox/shell/msh_test/msh-bugs/var_expand_in_redir.tests @@ -0,0 +1,13 @@ +if test $# = 0; then + exec "$THIS_SH" "$0" abc "d e" +fi + +echo TEST1 >"$1.out" +echo TEST2 >"$2.out" +# bash says: "$@.out": ambiguous redirect +# ash handles it as if it is '$*' - we do the same +echo TEST3 >"$@.out" + +cat abc.out "d e.out" "abc d e.out" + +rm abc.out "d e.out" "abc d e.out" |