A2osX/TESTS/IFSTRTEST.txt

50 lines
842 B
Plaintext
Raw Normal View History

NEW
PREFIX
AUTO 4,1
#!/BIN/SH
#
#
#
#!/BIN/SH
2019-03-01 18:19:14 +00:00
ECHO "\f IF String Tests"
ECHO "\nThis Performs Several String Comparison Tests\n"
ECHO -N " Test 1 ABC = ABC : "
2019-01-16 04:50:18 +00:00
IF [ "ABC" = "ABC" ]
echo PASSED
2019-01-16 04:50:18 +00:00
ELSE
echo FAILED
2019-01-16 04:50:18 +00:00
FI
ECHO -N " Test 2 ABC not DEF : "
2019-01-16 04:50:18 +00:00
IF [ "ABC" != "DEF" ]
echo PASSED
2019-01-16 04:50:18 +00:00
ELSE
echo FAILED
2019-01-16 04:50:18 +00:00
FI
ECHO -N " Test 3 ABC = ABCD : "
2019-01-16 04:50:18 +00:00
IF [ "ABC" = "ABCD" ]
echo FAILED
2019-01-16 04:50:18 +00:00
ELSE
echo PASSED
2019-01-16 04:50:18 +00:00
FI
ECHO -N " Test 4 ABC not ABC : "
2019-01-16 04:50:18 +00:00
IF [ "ABC" != "ABC" ]
echo FAILED
2019-01-16 04:50:18 +00:00
ELSE
echo PASSED
2019-01-16 04:50:18 +00:00
FI
2019-03-01 18:19:14 +00:00
ECHO -N " Test 5 -N Bad Var : "
IF [ -N $ABC ]
echo FAILED
ELSE
echo PASSED
FI
2019-03-01 18:19:14 +00:00
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