msh: create testsuite (based on hush one)
hush: add TODO (doesn't know ":" command)
This commit is contained in:
shell
hush_test
msh_test
msh-bugs
noeol3.rightnoeol3.testsprocess_subst.rightprocess_subst.testsread.rightread.testsshift.rightshift.testsstarquoted.rightstarquoted.testssyntax_err.rightsyntax_err.testsvar_expand_in_assign.rightvar_expand_in_assign.testsvar_expand_in_redir.rightvar_expand_in_redir.tests
msh-execution
msh-misc
msh-parsing
argv0.rightargv0.testsnoeol.rightnoeol.testsnoeol2.rightnoeol2.testsquote1.rightquote1.testsquote2.rightquote2.testsquote3.rightquote3.testsquote4.rightquote4.tests
msh-vars
run-all
1
shell/msh_test/msh-parsing/argv0.right
Normal file
1
shell/msh_test/msh-parsing/argv0.right
Normal file
@@ -0,0 +1 @@
|
||||
OK
|
4
shell/msh_test/msh-parsing/argv0.tests
Executable file
4
shell/msh_test/msh-parsing/argv0.tests
Executable file
@@ -0,0 +1,4 @@
|
||||
if test $# = 0; then
|
||||
exec "$THIS_SH" "$0" arg
|
||||
fi
|
||||
echo OK
|
1
shell/msh_test/msh-parsing/noeol.right
Normal file
1
shell/msh_test/msh-parsing/noeol.right
Normal file
@@ -0,0 +1 @@
|
||||
HELLO
|
2
shell/msh_test/msh-parsing/noeol.tests
Executable file
2
shell/msh_test/msh-parsing/noeol.tests
Executable file
@@ -0,0 +1,2 @@
|
||||
# next line has no EOL!
|
||||
echo HELLO
|
1
shell/msh_test/msh-parsing/noeol2.right
Normal file
1
shell/msh_test/msh-parsing/noeol2.right
Normal file
@@ -0,0 +1 @@
|
||||
1
|
7
shell/msh_test/msh-parsing/noeol2.tests
Executable file
7
shell/msh_test/msh-parsing/noeol2.tests
Executable file
@@ -0,0 +1,7 @@
|
||||
# last line has no EOL!
|
||||
if true
|
||||
then
|
||||
echo 1
|
||||
else
|
||||
echo 2
|
||||
fi
|
1
shell/msh_test/msh-parsing/quote1.right
Normal file
1
shell/msh_test/msh-parsing/quote1.right
Normal file
@@ -0,0 +1 @@
|
||||
'1'
|
2
shell/msh_test/msh-parsing/quote1.tests
Executable file
2
shell/msh_test/msh-parsing/quote1.tests
Executable file
@@ -0,0 +1,2 @@
|
||||
a=1
|
||||
echo "'$a'"
|
1
shell/msh_test/msh-parsing/quote2.right
Normal file
1
shell/msh_test/msh-parsing/quote2.right
Normal file
@@ -0,0 +1 @@
|
||||
>1
|
2
shell/msh_test/msh-parsing/quote2.tests
Executable file
2
shell/msh_test/msh-parsing/quote2.tests
Executable file
@@ -0,0 +1,2 @@
|
||||
a=1
|
||||
echo ">$a"
|
3
shell/msh_test/msh-parsing/quote3.right
Normal file
3
shell/msh_test/msh-parsing/quote3.right
Normal file
@@ -0,0 +1,3 @@
|
||||
Testing: in $empty""
|
||||
..
|
||||
Finished
|
8
shell/msh_test/msh-parsing/quote3.tests
Executable file
8
shell/msh_test/msh-parsing/quote3.tests
Executable file
@@ -0,0 +1,8 @@
|
||||
if test $# = 0; then
|
||||
exec "$THIS_SH" quote3.tests abc "d e"
|
||||
fi
|
||||
|
||||
echo 'Testing: in $empty""'
|
||||
empty=''
|
||||
for a in $empty""; do echo ".$a."; done
|
||||
echo Finished
|
1
shell/msh_test/msh-parsing/quote4.right
Normal file
1
shell/msh_test/msh-parsing/quote4.right
Normal file
@@ -0,0 +1 @@
|
||||
a b
|
2
shell/msh_test/msh-parsing/quote4.tests
Executable file
2
shell/msh_test/msh-parsing/quote4.tests
Executable file
@@ -0,0 +1,2 @@
|
||||
a_b='a b'
|
||||
echo "$a_b"
|
Reference in New Issue
Block a user