A2osX/TESTS/CORETEST

58 lines
1.5 KiB
Plaintext
Raw Normal View History

NEW
PREFIX
AUTO 4,1
#!/BIN/SH
#
# This script performs a series of tests for commands or
# features that are needed by even the most basic tests so
# therefor are CORE to entire test suite.
#
ECHO "\nThis script will test the core commands and features"
ECHO "\needed by most if not all other tests."
ECHO "\nIf you are reading this then the first two tests have"
ECHO "already passed, being able to run scripts with BIN/SH and"
ECHO "the ECHO command."
ECHO "\nPress Return to begin additional tests."
PAUSE
ECHO "\nThe third test is of the Read command.\n"
READ -P "Please enter Y and press return " Z
IF [ $Z = "y" ]
SET Z = "Y"
FI
IF [ $Z != "Y" ]
ECHO "\nFAILED Coretest READ"
ECHO "\nTerminating CORETEST Early\n"
EXIT 254
FI
ECHO "\nNext we test for Return Codes."
ECHO "Note: You may see an error on the screen from running"
ECHO "this test, that is OK. You will be told if the RC"
ECHO "test PASSED or FAILED"
ECHO "\nPress Return to begin RC tests."
PAUSE
RC144
IF [ $? -EQ 144 ]
ECHO "\nPassed RC Test"
ELSE
ECHO "\nFAILED Coretest RC"
ECHO "\nTerminating CORETEST Early\n"
EXIT 254
FI
ECHO "\nNext we test the IF script element."
ECHO "Note this does not test all IF options,"
ECHO "run Internal Command Tests to fully test IF."
ECHO "\nPress Return to begin IF tests."
PAUSE
IF [ -D ${ROOT} ]
ELSE
ECHO "\nFailed Coretest IF -D"
EXIT 254
FI
IF [ -D ${ROOT}A2OSX.SYSTEM ]
ELSE
ECHO "\nFailed Coretest IF -F"
EXIT 254
FI
MAN
TEXT /MAKE/USR/SHARE/TESTS/CORETEST