A2osX/TESTS/IFNUMTEST.txt
2019-02-27 16:56:35 -05:00

97 lines
1.6 KiB
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
#
#
#
ECHO "\f If Numeric Tests"
ECHO "\nThis Performs Several Numeric Comparison Tests"
ECHO -N "\n Test 1: 99 = 99 "
IF [ 99 -eq 99 ]
echo True Pass
ELSE
echo False Fail
FI
ECHO -N " Test 2: 99 = 79 "
IF [ 99 -eq 79 ]
echo True Fail
ELSE
echo False Pass
FI
ECHO -N " Test 3: 99 <> 99 "
IF [ 99 -NE 99 ]
echo True Fail
ELSE
echo False Pass
FI
ECHO -N " Test 4: 99 <> 79 "
IF [ 99 -NE 79 ]
echo True Pass
ELSE
echo False Fail
FI
ECHO -N " Test 5: 99 < 79 "
IF [ 99 -LT 79 ]
ECHO True Fail
ELSE
ECHO False Pass
FI
ECHO -N " Test 6: 79 < 99 "
IF [ 79 -LT 99 ]
ECHO True Pass
ELSE
ECHO False Fail
FI
ECHO -N " Test 7: 99 <= 79 "
IF [ 99 -LE 79 ]
ECHO True Fail
ELSE
ECHO False Pass
FI
ECHO -N " Test 8: 79 <= 99 "
IF [ 79 -LE 99 ]
ECHO True Pass
ELSE
ECHO False Fail
FI
ECHO -N " Test 9: 99 <= 99 "
IF [ 99 -LE 99 ]
ECHO True Pass
ELSE
ECHO False Fail
FI
ECHO -N " Test 10: 99 > 79 "
IF [ 99 -GT 79 ]
ECHO True Pass
ELSE
ECHO False Fail
FI
ECHO -N " Test 11: 79 > 99 "
IF [ 79 -GT 99 ]
ECHO True Fail
ELSE
ECHO False Pass
FI
ECHO -N " Test 12: 99 => 79 "
IF [ 99 -GE 79 ]
ECHO True Pass
ELSE
ECHO False Fail
FI
ECHO -N " Test 13: 79 => 99 "
IF [ 79 -GE 99 ]
ECHO True Fail
ELSE
ECHO False Pass
FI
ECHO -N " Test 14: 99 => 99 "
IF [ 99 -GE 99 ]
ECHO True Pass
ELSE
ECHO False Fail
FI
ECHO "\n End of Test\n"
MAN
TEXT /MAKE/USR/SHARE/TESTS/IFNUMTEST