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 000000000..56f8515b7 --- /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 000000000..ec958ed7a --- /dev/null +++ b/shell/msh_test/msh-bugs/noeol3.tests | |||
@@ -0,0 +1,2 @@ | |||
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 new file mode 100644 index 000000000..397bc8067 --- /dev/null +++ b/shell/msh_test/msh-bugs/process_subst.right | |||
@@ -0,0 +1,3 @@ | |||
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 new file mode 100755 index 000000000..21996bc0e --- /dev/null +++ b/shell/msh_test/msh-bugs/process_subst.tests | |||
@@ -0,0 +1,3 @@ | |||
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 new file mode 100644 index 000000000..0e50e2a23 --- /dev/null +++ b/shell/msh_test/msh-bugs/read.right | |||
@@ -0,0 +1,4 @@ | |||
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 new file mode 100755 index 000000000..ff1acbde1 --- /dev/null +++ b/shell/msh_test/msh-bugs/read.tests | |||
@@ -0,0 +1,4 @@ | |||
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 new file mode 100644 index 000000000..d281e358c --- /dev/null +++ b/shell/msh_test/msh-bugs/shift.right | |||
@@ -0,0 +1,6 @@ | |||
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 new file mode 100755 index 000000000..53ef249f2 --- /dev/null +++ b/shell/msh_test/msh-bugs/shift.tests | |||
@@ -0,0 +1,14 @@ | |||
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 new file mode 100644 index 000000000..b56323fe1 --- /dev/null +++ b/shell/msh_test/msh-bugs/starquoted.right | |||
@@ -0,0 +1,8 @@ | |||
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 new file mode 100755 index 000000000..2fe49b1cd --- /dev/null +++ b/shell/msh_test/msh-bugs/starquoted.tests | |||
@@ -0,0 +1,8 @@ | |||
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 new file mode 100644 index 000000000..08a270c31 --- /dev/null +++ b/shell/msh_test/msh-bugs/syntax_err.right | |||
@@ -0,0 +1,2 @@ | |||
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 new file mode 100755 index 000000000..d10ed42e9 --- /dev/null +++ b/shell/msh_test/msh-bugs/syntax_err.tests | |||
@@ -0,0 +1,3 @@ | |||
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 new file mode 100644 index 000000000..352210d7e --- /dev/null +++ b/shell/msh_test/msh-bugs/var_expand_in_assign.right | |||
@@ -0,0 +1,5 @@ | |||
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 new file mode 100755 index 000000000..18cdc74c0 --- /dev/null +++ b/shell/msh_test/msh-bugs/var_expand_in_assign.tests | |||
@@ -0,0 +1,15 @@ | |||
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 new file mode 100644 index 000000000..423299c97 --- /dev/null +++ b/shell/msh_test/msh-bugs/var_expand_in_redir.right | |||
@@ -0,0 +1,3 @@ | |||
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 new file mode 100755 index 000000000..bda6bdd7f --- /dev/null +++ b/shell/msh_test/msh-bugs/var_expand_in_redir.tests | |||
@@ -0,0 +1,13 @@ | |||
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" | ||