diff options
Diffstat (limited to 'shell/msh_test/msh-bugs')
-rw-r--r-- | shell/msh_test/msh-bugs/noeol3.right | 1 | ||||
-rwxr-xr-x | shell/msh_test/msh-bugs/noeol3.tests | 2 | ||||
-rw-r--r-- | shell/msh_test/msh-bugs/process_subst.right | 3 | ||||
-rwxr-xr-x | shell/msh_test/msh-bugs/process_subst.tests | 3 | ||||
-rw-r--r-- | shell/msh_test/msh-bugs/read.right | 4 | ||||
-rwxr-xr-x | shell/msh_test/msh-bugs/read.tests | 4 | ||||
-rw-r--r-- | shell/msh_test/msh-bugs/shift.right | 6 | ||||
-rwxr-xr-x | shell/msh_test/msh-bugs/shift.tests | 14 | ||||
-rw-r--r-- | shell/msh_test/msh-bugs/starquoted.right | 8 | ||||
-rwxr-xr-x | shell/msh_test/msh-bugs/starquoted.tests | 8 | ||||
-rw-r--r-- | shell/msh_test/msh-bugs/syntax_err.right | 2 | ||||
-rwxr-xr-x | shell/msh_test/msh-bugs/syntax_err.tests | 3 | ||||
-rw-r--r-- | shell/msh_test/msh-bugs/var_expand_in_assign.right | 5 | ||||
-rwxr-xr-x | shell/msh_test/msh-bugs/var_expand_in_assign.tests | 15 | ||||
-rw-r--r-- | shell/msh_test/msh-bugs/var_expand_in_redir.right | 3 | ||||
-rwxr-xr-x | shell/msh_test/msh-bugs/var_expand_in_redir.tests | 13 |
16 files changed, 94 insertions, 0 deletions
diff --git a/shell/msh_test/msh-bugs/noeol3.right b/shell/msh_test/msh-bugs/noeol3.right new file mode 100644 index 0000000..56f8515 --- /dev/null +++ b/shell/msh_test/msh-bugs/noeol3.right @@ -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 new file mode 100755 index 0000000..ec958ed --- /dev/null +++ b/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/shell/msh_test/msh-bugs/process_subst.right b/shell/msh_test/msh-bugs/process_subst.right new file mode 100644 index 0000000..397bc80 --- /dev/null +++ b/shell/msh_test/msh-bugs/process_subst.right @@ -0,0 +1,3 @@ +TESTzzBEST +TEST$(echo zz)BEST +TEST'BEST diff --git a/shell/msh_test/msh-bugs/process_subst.tests b/shell/msh_test/msh-bugs/process_subst.tests new file mode 100755 index 0000000..21996bc --- /dev/null +++ b/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/shell/msh_test/msh-bugs/read.right b/shell/msh_test/msh-bugs/read.right new file mode 100644 index 0000000..0e50e2a --- /dev/null +++ b/shell/msh_test/msh-bugs/read.right @@ -0,0 +1,4 @@ +read +cat +echo "REPLY=$REPLY" +REPLY=exec <read.tests diff --git a/shell/msh_test/msh-bugs/read.tests b/shell/msh_test/msh-bugs/read.tests new file mode 100755 index 0000000..ff1acbd --- /dev/null +++ b/shell/msh_test/msh-bugs/read.tests @@ -0,0 +1,4 @@ +exec <read.tests +read +cat +echo "REPLY=$REPLY" diff --git a/shell/msh_test/msh-bugs/shift.right b/shell/msh_test/msh-bugs/shift.right new file mode 100644 index 0000000..d281e35 --- /dev/null +++ b/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/shell/msh_test/msh-bugs/shift.tests b/shell/msh_test/msh-bugs/shift.tests new file mode 100755 index 0000000..53ef249 --- /dev/null +++ b/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/shell/msh_test/msh-bugs/starquoted.right b/shell/msh_test/msh-bugs/starquoted.right new file mode 100644 index 0000000..b56323f --- /dev/null +++ b/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/shell/msh_test/msh-bugs/starquoted.tests b/shell/msh_test/msh-bugs/starquoted.tests new file mode 100755 index 0000000..2fe49b1 --- /dev/null +++ b/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/shell/msh_test/msh-bugs/syntax_err.right b/shell/msh_test/msh-bugs/syntax_err.right new file mode 100644 index 0000000..08a270c --- /dev/null +++ b/shell/msh_test/msh-bugs/syntax_err.right @@ -0,0 +1,2 @@ +shown +hush: syntax error: unterminated ' diff --git a/shell/msh_test/msh-bugs/syntax_err.tests b/shell/msh_test/msh-bugs/syntax_err.tests new file mode 100755 index 0000000..d10ed42 --- /dev/null +++ b/shell/msh_test/msh-bugs/syntax_err.tests @@ -0,0 +1,3 @@ +echo shown +echo test `echo 'aa` +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 new file mode 100644 index 0000000..352210d --- /dev/null +++ b/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/shell/msh_test/msh-bugs/var_expand_in_assign.tests b/shell/msh_test/msh-bugs/var_expand_in_assign.tests new file mode 100755 index 0000000..18cdc74 --- /dev/null +++ b/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/shell/msh_test/msh-bugs/var_expand_in_redir.right b/shell/msh_test/msh-bugs/var_expand_in_redir.right new file mode 100644 index 0000000..423299c --- /dev/null +++ b/shell/msh_test/msh-bugs/var_expand_in_redir.right @@ -0,0 +1,3 @@ +TEST1 +TEST2 +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 new file mode 100755 index 0000000..bda6bdd --- /dev/null +++ b/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" |