A2osX/TESTS/BADSHTEST.txt

33 lines
810 B
Plaintext
Raw Normal View History

2019-01-16 04:50:18 +00:00
NEW
PREFIX
2019-01-16 04:50:18 +00:00
AUTO 4,1
#!/BIN/SH
2019-01-16 04:50:18 +00:00
#
# 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.
#
2019-03-07 02:13:28 +00:00
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
BADSCRIPT 2> /DEV/NULL
2019-01-16 04:50:18 +00:00
SET R = $?
IF [ $R -EQ 246 ]
2019-03-01 18:19:14 +00:00
IF [ -N $Log ]
2019-01-16 04:50:18 +00:00
SET P = $P + 1
echo "BADSHTEST Passed" >> ${Log}
FI
echo "\nBADSHTEST Passed\n"
ELSE
2019-03-01 18:19:14 +00:00
IF [ -N $Log ]
2019-01-16 04:50:18 +00:00
SET F = $F + 1
echo "BADSHTEST Failed - $R" >> ${Log}
2019-01-16 04:50:18 +00:00
FI
2019-03-07 02:13:28 +00:00
echo "\nBADSHTEST Failed - $R\n"
2019-01-16 04:50:18 +00:00
FI
2019-03-07 02:13:28 +00:00
SET R =
2019-01-16 04:50:18 +00:00
MAN
TEXT /MAKE/USR/SHARE/TESTS/BADSHTEST