A2osX/TESTS/ECHOTEST.txt

172 lines
3.2 KiB
Plaintext
Raw Normal View History

2019-01-16 04:50:18 +00:00
NEW
PREFIX
2019-01-16 04:50:18 +00:00
AUTO 4,1
#!/BIN/SH
Echo "\f\nThis Script will perform a series of tests on the ECHO command"
2019-01-25 04:29:46 +00:00
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
2019-03-03 02:15:17 +00:00
IF [ -Z $T ]
SET T = 0
FI
2019-01-16 04:50:18 +00:00
SET T = $T + 1
echo \f
2019-02-05 02:43:50 +00:00
echo \n
2019-01-16 04:50:18 +00:00
read -P "Did the screen clear: " Z
IF [ $Z = "y" ]
SET Z = "Y"
FI
IF [ $Z = "Y" ]
2019-03-01 18:19:14 +00:00
IF [ -N $Log ]
2019-01-16 04:50:18 +00:00
SET P = $P + 1
echo "ECHO Clear Screen Passed" >> ${Log}
FI
ELSE
2019-03-01 18:19:14 +00:00
IF [ -N $Log ]
2019-01-16 04:50:18 +00:00
SET F = $F + 1
echo "ECHO Clear Screen Failed" >> ${Log}
FI
FI
#Backspace Test
SET T = $T + 1
echo
echo "\n"
2019-01-16 04:50:18 +00:00
echo "----> 1234\b\b5678 <----"
echo "\n"
2019-01-16 04:50:18 +00:00
read -P "Is 125678 displayed between the arrows: " Z
IF [ $Z = "y" ]
SET Z = "Y"
FI
IF [ $Z = "Y" ]
2019-03-01 18:19:14 +00:00
IF [ -N $Log ]
2019-01-16 04:50:18 +00:00
SET P = $P + 1
echo "ECHO Backspace Passed" >> ${Log}
FI
ELSE
2019-03-01 18:19:14 +00:00
IF [ -N $Log ]
2019-01-16 04:50:18 +00:00
SET F = $F + 1
echo "ECHO Backspace Failed" >> ${Log}
FI
FI
#Inverse Test
SET T = $T + 1
echo
echo "\n"
2019-01-16 04:50:18 +00:00
echo "----> abc \e[7mdef\e[0m ghi <----"
echo "\n"
2019-01-16 04:50:18 +00:00
read -P "Is def above inversed: " Z
IF [ $Z = "y" ]
SET Z = "Y"
FI
IF [ $Z = "Y" ]
2019-03-01 18:19:14 +00:00
IF [ -N $Log ]
2019-01-16 04:50:18 +00:00
SET P = $P + 1
echo "ECHO Inverse Passed" >> ${Log}
FI
ELSE
2019-03-01 18:19:14 +00:00
IF [ -N $Log ]
2019-01-16 04:50:18 +00:00
SET F = $F + 1
echo "ECHO Inverse Failed" >> ${Log}
FI
FI
#Newline Test
SET T = $T + 1
echo
echo "\n"
2019-01-16 04:50:18 +00:00
echo "----> abc\ndef <----"
echo "\n"
2019-01-16 04:50:18 +00:00
read -P "Does abcdef appear split between two lines: " Z
IF [ $Z = "y" ]
SET Z = "Y"
FI
IF [ $Z = "Y" ]
2019-03-01 18:19:14 +00:00
IF [ -N $Log ]
2019-01-16 04:50:18 +00:00
SET P = $P + 1
echo "ECHO Newline Passed" >> ${Log}
FI
ELSE
2019-03-01 18:19:14 +00:00
IF [ -N $Log ]
2019-01-16 04:50:18 +00:00
SET F = $F + 1
echo "ECHO Newline Failed" >> ${Log}
FI
FI
#Backslash Test
SET T = $T + 1
echo
echo "\n"
2019-01-16 04:50:18 +00:00
echo "----> \\ <----"
echo "\n"
2019-01-16 04:50:18 +00:00
read -P "Is there a blackslash above: " Z
IF [ $Z = "y" ]
SET Z = "Y"
FI
IF [ $Z = "Y" ]
2019-03-01 18:19:14 +00:00
IF [ -N $Log ]
2019-01-16 04:50:18 +00:00
SET P = $P + 1
echo "ECHO Backslash Passed" >> ${Log}
FI
ELSE
2019-03-01 18:19:14 +00:00
IF [ -N $Log ]
2019-01-16 04:50:18 +00:00
SET F = $F + 1
echo "ECHO Backslash Failed" >> ${Log}
FI
FI
#Percent Test
SET T = $T + 1
echo
echo "\n"
2019-01-16 04:50:18 +00:00
echo "----> \% <----"
echo "\n"
2019-01-16 04:50:18 +00:00
read -P "Is there a percent symbol above: " Z
IF [ $Z = "y" ]
SET Z = "Y"
FI
IF [ $Z = "Y" ]
2019-03-01 18:19:14 +00:00
IF [ -N $Log ]
2019-01-16 04:50:18 +00:00
SET P = $P + 1
echo "ECHO Percent Passed" >> ${Log}
FI
ELSE
2019-03-01 18:19:14 +00:00
IF [ -N $Log ]
2019-01-16 04:50:18 +00:00
SET F = $F + 1
echo "ECHO Percent Failed" >> ${Log}
FI
FI
#Newline Suppress Test
SET T = $T + 1
echo
echo "\n"
2019-01-16 04:50:18 +00:00
echo -N "----> "
echo -N "One"
echo -N "Two"
echo -N "Three"
echo " <----"
echo "\n"
2019-01-16 04:50:18 +00:00
read -P "Do you see OneTwoThree between arrows on only ONE line above: " Z
IF [ $Z = "y" ]
SET Z = "Y"
FI
IF [ $Z = "Y" ]
2019-03-01 18:19:14 +00:00
IF [ -N $Log ]
2019-01-16 04:50:18 +00:00
SET P = $P + 1
echo "ECHO Newline Suppress Passed" >> ${Log}
FI
ELSE
2019-03-01 18:19:14 +00:00
IF [ -N $Log ]
2019-01-16 04:50:18 +00:00
SET F = $F + 1
echo "ECHO Newline Suppress Failed" >> ${Log}
FI
FI
2019-03-07 02:13:28 +00:00
echo
2019-03-01 18:19:14 +00:00
echo "\nEcho Tests Done"
IF [ -N $Log ]
2019-01-16 04:50:18 +00:00
echo "ECHO Tests Complete" >> ${Log}
FI
SET Z =
2019-01-16 04:50:18 +00:00
MAN
TEXT /MAKE/USR/SHARE/TESTS/ECHOTEST