2019-01-15 23:50:18 -05:00
|
|
|
|
NEW
|
2019-02-13 23:45:39 -05:00
|
|
|
|
PREFIX
|
2019-01-15 23:50:18 -05:00
|
|
|
|
AUTO 4,1
|
2019-02-21 22:47:12 -05:00
|
|
|
|
#!/BIN/SH
|
2019-01-15 23:50:18 -05: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-06 21:13:28 -05: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
|
2019-12-02 14:07:59 -05:00
|
|
|
|
SET -E
|
2019-11-29 15:29:25 -05:00
|
|
|
|
BADSCRIPT 2> /dev/null
|
2019-01-15 23:50:18 -05:00
|
|
|
|
SET R = $?
|
2019-04-10 22:48:43 -04:00
|
|
|
|
IF [ $R -EQ 118 ]
|
2019-03-01 13:19:14 -05:00
|
|
|
|
IF [ -N $Log ]
|
2019-01-15 23:50:18 -05:00
|
|
|
|
SET P = $P + 1
|
|
|
|
|
echo "BADSHTEST Passed" >> ${Log}
|
|
|
|
|
FI
|
|
|
|
|
echo "\nBADSHTEST Passed\n"
|
|
|
|
|
ELSE
|
2019-03-01 13:19:14 -05:00
|
|
|
|
IF [ -N $Log ]
|
2019-01-15 23:50:18 -05:00
|
|
|
|
SET F = $F + 1
|
2019-02-13 23:45:39 -05:00
|
|
|
|
echo "BADSHTEST Failed - $R" >> ${Log}
|
2019-01-15 23:50:18 -05:00
|
|
|
|
FI
|
2019-03-06 21:13:28 -05:00
|
|
|
|
echo "\nBADSHTEST Failed - $R\n"
|
2019-01-15 23:50:18 -05:00
|
|
|
|
FI
|
2019-03-06 21:13:28 -05:00
|
|
|
|
SET R =
|
2019-12-03 00:13:40 -05:00
|
|
|
|
SET -E
|
2019-01-15 23:50:18 -05:00
|
|
|
|
MAN
|
2019-02-13 23:45:39 -05:00
|
|
|
|
TEXT /MAKE/USR/SHARE/TESTS/BADSHTEST
|