A2osX/TESTS/ECHOTEST

162 lines
3.2 KiB
Plaintext
Raw Normal View History

2019-01-16 04:50:18 +00:00
NEW
PREFIX /A2OSX.BUILD
AUTO 4,1
#!/BIN/SHELL
2019-01-25 04:29:46 +00:00
Echo "\n\nThis Script will perform a series of tests on the ECHO command"
echo "\nSince these are visual tests, you will be asked to verify that"
echo "each performed as expected by Responding (Y) or (N) after each test."
echo "Responses can be in UPPER or Lower case and are a single letter,"
echo "Y for Yes and N for No. Return (blank or empty) will mean NO."
echo "\n\n"
READ -P "Press Return to start tests" Z
2019-01-16 04:50:18 +00:00
#Clear Screen Test
SET T = $T + 1
echo \f
echo \n\n
read -P "Did the screen clear: " Z
IF [ $Z = "y" ]
SET Z = "Y"
FI
IF [ $Z = "Y" ]
IF [ $B -GT 0 ]
SET P = $P + 1
echo "ECHO Clear Screen Passed" >> ${Log}
FI
ELSE
IF [ $B -GT 0 ]
SET F = $F + 1
echo "ECHO Clear Screen Failed" >> ${Log}
FI
FI
#Backspace Test
SET T = $T + 1
echo \n\n
echo "----> 1234\b\b5678 <----"
echo \n\n
read -P "Is 125678 displayed between the arrows: " Z
IF [ $Z = "y" ]
SET Z = "Y"
FI
IF [ $Z = "Y" ]
IF [ $B -GT 0 ]
SET P = $P + 1
echo "ECHO Backspace Passed" >> ${Log}
FI
ELSE
IF [ $B -GT 0 ]
SET F = $F + 1
echo "ECHO Backspace Failed" >> ${Log}
FI
FI
#Inverse Test
SET T = $T + 1
echo \n\n
echo "----> abc \e[7mdef\e[0m ghi <----"
echo \n\n
read -P "Is def above inversed: " Z
IF [ $Z = "y" ]
SET Z = "Y"
FI
IF [ $Z = "Y" ]
IF [ $B -GT 0 ]
SET P = $P + 1
echo "ECHO Inverse Passed" >> ${Log}
FI
ELSE
IF [ $B -GT 0 ]
SET F = $F + 1
echo "ECHO Inverse Failed" >> ${Log}
FI
FI
#Newline Test
SET T = $T + 1
echo \n\n
echo "----> abc\ndef <----"
echo \n\n
read -P "Does abcdef appear split between two lines: " Z
IF [ $Z = "y" ]
SET Z = "Y"
FI
IF [ $Z = "Y" ]
IF [ $B -GT 0 ]
SET P = $P + 1
echo "ECHO Newline Passed" >> ${Log}
FI
ELSE
IF [ $B -GT 0 ]
SET F = $F + 1
echo "ECHO Newline Failed" >> ${Log}
FI
FI
#Backslash Test
SET T = $T + 1
echo \n\n
echo "----> \\ <----"
echo \n\n
read -P "Is there a blackslash above: " Z
IF [ $Z = "y" ]
SET Z = "Y"
FI
IF [ $Z = "Y" ]
IF [ $B -GT 0 ]
SET P = $P + 1
echo "ECHO Backslash Passed" >> ${Log}
FI
ELSE
IF [ $B -GT 0 ]
SET F = $F + 1
echo "ECHO Backslash Failed" >> ${Log}
FI
FI
#Percent Test
SET T = $T + 1
echo \n\n
echo "----> \% <----"
echo \n\n
read -P "Is there a percent symbol above: " Z
IF [ $Z = "y" ]
SET Z = "Y"
FI
IF [ $Z = "Y" ]
IF [ $B -GT 0 ]
SET P = $P + 1
echo "ECHO Percent Passed" >> ${Log}
FI
ELSE
IF [ $B -GT 0 ]
SET F = $F + 1
echo "ECHO Percent Failed" >> ${Log}
FI
FI
#Newline Suppress Test
SET T = $T + 1
echo \n\n
echo -N "----> "
echo -N "One"
echo -N "Two"
echo -N "Three"
echo " <----"
echo \n\n
read -P "Do you see OneTwoThree between arrows on only ONE line above: " Z
IF [ $Z = "y" ]
SET Z = "Y"
FI
IF [ $Z = "Y" ]
IF [ $B -GT 0 ]
SET P = $P + 1
echo "ECHO Newline Suppress Passed" >> ${Log}
FI
ELSE
IF [ $B -GT 0 ]
SET F = $F + 1
echo "ECHO Newline Suppress Failed" >> ${Log}
FI
FI
echo "\nEcho Tests Done
IF [ $B -GT 0 ]
echo "ECHO Tests Complete" >> ${Log}
FI
SET Z =
MAN
TEXT USR/SHARE/TESTS/ECHOTEST