mirror of
https://github.com/A2osX/A2osX.git
synced 2025-02-18 00:30:40 +00:00
34 lines
859 B
Plaintext
34 lines
859 B
Plaintext
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 "\n\nThis test will generate an error"
|
||
echo "between the lines. This is expected."
|
||
echo "---------------------------------------"
|
||
BADSCRIPT
|
||
SET R = $?
|
||
ECHO $R
|
||
echo "---------------------------------------"
|
||
IF [ $R -EQ 246 ]
|
||
IF [ -N $Log ]
|
||
SET P = $P + 1
|
||
echo "I am at AAAAAAA Pass with Log"
|
||
echo "BADSHTEST Passed" >> ${Log}
|
||
FI
|
||
echo "\nBADSHTEST Passed\n"
|
||
ELSE
|
||
IF [ -N $Log ]
|
||
SET F = $F + 1
|
||
echo "I am at BBBBBBB Fail with Log"
|
||
echo "BADSHTEST Failed - $R" >> ${Log}
|
||
FI
|
||
echo "\nBADSHTEST Failed - $R\n"
|
||
FI
|
||
MAN
|
||
TEXT /MAKE/USR/SHARE/TESTS/BADSHTEST
|