A2osX/TESTS/BADSHTEST.txt
2019-12-03 00:13:40 -05:00

35 lines
826 B
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

NEW
PREFIX
AUTO 4,1
#!/BIN/SH
#
# BADSHTEST tests that the shell detects and properly handles
# (with error) an invalid shell script. It should return error
# F6/246. This script calls BADSCRIPT and checks for that code.
#
echo "\f\n\n Bad Shell Script Test"
echo "\n\nThis script tests that the A2osX Shell (SH)"
echo "correctly tests that scripts contain the correct"
echo "shell script header #!:/bin/sh"
echo
SET -E
BADSCRIPT 2> /dev/null
SET R = $?
IF [ $R -EQ 118 ]
IF [ -N $Log ]
SET P = $P + 1
echo "BADSHTEST Passed" >> ${Log}
FI
echo "\nBADSHTEST Passed\n"
ELSE
IF [ -N $Log ]
SET F = $F + 1
echo "BADSHTEST Failed - $R" >> ${Log}
FI
echo "\nBADSHTEST Failed - $R\n"
FI
SET R =
SET -E
MAN
TEXT /MAKE/USR/SHARE/TESTS/BADSHTEST