A2osX/TESTS/IFSTRTEST.txt
2019-03-01 13:19:14 -05:00

50 lines
842 B
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

NEW
PREFIX
AUTO 4,1
#!/BIN/SH
#
#
#
#!/BIN/SH
ECHO "\f IF String Tests"
ECHO "\nThis Performs Several String Comparison Tests\n"
ECHO -N " Test 1 ABC = ABC : "
IF [ "ABC" = "ABC" ]
echo PASSED
ELSE
echo FAILED
FI
ECHO -N " Test 2 ABC not DEF : "
IF [ "ABC" != "DEF" ]
echo PASSED
ELSE
echo FAILED
FI
ECHO -N " Test 3 ABC = ABCD : "
IF [ "ABC" = "ABCD" ]
echo FAILED
ELSE
echo PASSED
FI
ECHO -N " Test 4 ABC not ABC : "
IF [ "ABC" != "ABC" ]
echo FAILED
ELSE
echo PASSED
FI
ECHO -N " Test 5 -N Bad Var : "
IF [ -N $ABC ]
echo FAILED
ELSE
echo PASSED
FI
ECHO -N " Test 6 -Z Bad Var : "
IF [ -Z $ABC ]
echo PASSED
ELSE
echo FAILED
FI
ECHO "\n End of Test\n"
MAN
TEXT /MAKE/USR/SHARE/TESTS/IFSTRTEST