2019-02-21 21:19:56 +00:00
|
|
|
|
NEW
|
|
|
|
|
PREFIX
|
|
|
|
|
AUTO 4,1
|
|
|
|
|
#!/BIN/SH
|
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
#!/BIN/SH
|
2019-02-22 03:47:12 +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" ]
|
2019-02-22 03:47:12 +00:00
|
|
|
|
echo PASSED
|
2019-01-16 04:50:18 +00:00
|
|
|
|
ELSE
|
2019-02-22 03:47:12 +00:00
|
|
|
|
echo FAILED
|
2019-01-16 04:50:18 +00:00
|
|
|
|
FI
|
2019-02-22 03:47:12 +00:00
|
|
|
|
ECHO -N " Test 2 ABC not DEF : "
|
2019-01-16 04:50:18 +00:00
|
|
|
|
IF [ "ABC" != "DEF" ]
|
2019-02-22 03:47:12 +00:00
|
|
|
|
echo PASSED
|
2019-01-16 04:50:18 +00:00
|
|
|
|
ELSE
|
2019-02-22 03:47:12 +00:00
|
|
|
|
echo FAILED
|
2019-01-16 04:50:18 +00:00
|
|
|
|
FI
|
2019-02-22 03:47:12 +00:00
|
|
|
|
ECHO -N " Test 3 ABC = ABCD : "
|
2019-01-16 04:50:18 +00:00
|
|
|
|
IF [ "ABC" = "ABCD" ]
|
2019-02-22 03:47:12 +00:00
|
|
|
|
echo FAILED
|
2019-01-16 04:50:18 +00:00
|
|
|
|
ELSE
|
2019-02-22 03:47:12 +00:00
|
|
|
|
echo PASSED
|
2019-01-16 04:50:18 +00:00
|
|
|
|
FI
|
2019-02-22 03:47:12 +00:00
|
|
|
|
ECHO -N " Test 4 ABC not ABC : "
|
2019-01-16 04:50:18 +00:00
|
|
|
|
IF [ "ABC" != "ABC" ]
|
2019-02-22 03:47:12 +00:00
|
|
|
|
echo FAILED
|
2019-01-16 04:50:18 +00:00
|
|
|
|
ELSE
|
2019-02-22 03:47:12 +00:00
|
|
|
|
echo PASSED
|
2019-01-16 04:50:18 +00:00
|
|
|
|
FI
|
2019-02-22 03:47:12 +00:00
|
|
|
|
ECHO "\n End of Test\n"
|
2019-02-21 21:19:56 +00:00
|
|
|
|
MAN
|
|
|
|
|
TEXT /MAKE/USR/SHARE/TESTS/IFSTRTEST
|