2019-01-16 04:50:18 +00:00
|
|
|
|
NEW
|
2019-02-14 04:45:39 +00:00
|
|
|
|
PREFIX
|
2019-01-16 04:50:18 +00:00
|
|
|
|
AUTO 4,1
|
2019-02-22 03:47:12 +00:00
|
|
|
|
#!/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
|
2019-12-02 19:07:59 +00:00
|
|
|
|
SET -E
|
2019-11-29 20:29:25 +00:00
|
|
|
|
BADSCRIPT 2> /dev/null
|
2019-01-16 04:50:18 +00:00
|
|
|
|
SET R = $?
|
2019-04-11 02:48:43 +00:00
|
|
|
|
IF [ $R -EQ 118 ]
|
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
|
2019-02-14 04:45:39 +00:00
|
|
|
|
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-12-03 05:13:40 +00:00
|
|
|
|
SET -E
|
2019-01-16 04:50:18 +00:00
|
|
|
|
MAN
|
2019-02-14 04:45:39 +00:00
|
|
|
|
TEXT /MAKE/USR/SHARE/TESTS/BADSHTEST
|