mirror of
https://github.com/A2osX/A2osX.git
synced 2024-06-06 10:29:30 +00:00
Updated several test scripts and added new ones. RUN IFSTRTEST and READIF tests.
This commit is contained in:
parent
55a8f975b8
commit
c5ee866919
Binary file not shown.
|
@ -1,4 +1,11 @@
|
||||||
#!/BIN/SHELL
|
NEW
|
||||||
|
PREFIX
|
||||||
|
AUTO 4,1
|
||||||
|
#!/BIN/SH
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#!/BIN/SH
|
||||||
ECHO \f IF String Tests
|
ECHO \f IF String Tests
|
||||||
ECHO \n\n This Performs Several String Comparison Tests
|
ECHO \n\n This Performs Several String Comparison Tests
|
||||||
ECHO Test 1 ABC = ABC
|
ECHO Test 1 ABC = ABC
|
||||||
|
@ -27,3 +34,5 @@ echo This Test Failed
|
||||||
ELSE
|
ELSE
|
||||||
echo This Test Passed
|
echo This Test Passed
|
||||||
FI
|
FI
|
||||||
|
MAN
|
||||||
|
TEXT /MAKE/USR/SHARE/TESTS/IFSTRTEST
|
||||||
|
|
25
TESTS/READIF
Normal file
25
TESTS/READIF
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
NEW
|
||||||
|
PREFIX
|
||||||
|
AUTO 4,1
|
||||||
|
#!/BIN/SH
|
||||||
|
#
|
||||||
|
# This script uses READ to set a VAR and then attempts
|
||||||
|
# to test it for validity as a String or Number
|
||||||
|
#
|
||||||
|
ECHO "\n\nBasic READ and IF Testing\n\n"
|
||||||
|
READ -P "Please type and A and press return: " Z
|
||||||
|
ECHO "\nYou typed: $Z\n"
|
||||||
|
IF [ $Z = "A" ]
|
||||||
|
ECHO "Test Passed First IF"
|
||||||
|
ELSE
|
||||||
|
ECHO "Test Failed First IF"
|
||||||
|
FI
|
||||||
|
READ -P "Please type and 1 and press return: " Z
|
||||||
|
ECHO "\nYou typed: $Z\n"
|
||||||
|
IF [ $Z = "1" ]
|
||||||
|
ECHO "Test Passed Second IF"
|
||||||
|
ELSE
|
||||||
|
ECHO "Test Failed Second IF"
|
||||||
|
FI
|
||||||
|
MAN
|
||||||
|
TEXT /MAKE/USR/SHARE/TESTS/READIF
|
19
TESTS/SKIPBLOCK
Normal file
19
TESTS/SKIPBLOCK
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
NEW
|
||||||
|
PREFIX
|
||||||
|
AUTO 4,1
|
||||||
|
#!/BIN/SH
|
||||||
|
#
|
||||||
|
# This script tests to see the Script Engine doesnt evaluate
|
||||||
|
# a block that should not be reached by code
|
||||||
|
#
|
||||||
|
IF [ 1 -EQ 1 ]
|
||||||
|
# This block should be executed
|
||||||
|
ECHO "If only this message appears then this test PASSED"
|
||||||
|
ELSE
|
||||||
|
# This block should not so anything should be able
|
||||||
|
# to be put here including bad math and commands
|
||||||
|
SET $BADVAR = $BADVAR + 1
|
||||||
|
DOBADTHINGS
|
||||||
|
FI
|
||||||
|
MAN
|
||||||
|
TEXT /MAKE/USR/SHARE/TESTS/SKIPBLOCK
|
|
@ -8,7 +8,7 @@ AUTO 4,1
|
||||||
#
|
#
|
||||||
ECHO "\f A2osX Test System Menu\n"
|
ECHO "\f A2osX Test System Menu\n"
|
||||||
ECHO " 1) Core Tests"
|
ECHO " 1) Core Tests"
|
||||||
ECHO " 2) Display Tests (Echo and Read)"
|
ECHO " B) Display Tests (Echo and Read)"
|
||||||
ECHO " 3) Pathing Tests (CD PWD POPD PUSHD)"
|
ECHO " 3) Pathing Tests (CD PWD POPD PUSHD)"
|
||||||
ECHO " 4) Internal Command Tests"
|
ECHO " 4) Internal Command Tests"
|
||||||
ECHO " 5) External Command Tests"
|
ECHO " 5) External Command Tests"
|
||||||
|
@ -18,10 +18,10 @@ ECHO " 8) Display Logs\n"
|
||||||
ECHO " 9) Build Test Suite with Logging"
|
ECHO " 9) Build Test Suite with Logging"
|
||||||
ECHO "\n"
|
ECHO "\n"
|
||||||
READ -P "Enter Choice: " Z
|
READ -P "Enter Choice: " Z
|
||||||
IF [ $Z = "1" ]
|
IF [ $Z -EQ 1 ]
|
||||||
CORETEST
|
CORETEST
|
||||||
ELSE
|
ELSE
|
||||||
IF [ $Z = "2" ]
|
IF [ $Z = "B" ]
|
||||||
DISPLAYTEST
|
DISPLAYTEST
|
||||||
ELSE
|
ELSE
|
||||||
IF [ $Z = "3" ]
|
IF [ $Z = "3" ]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user