mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-25 05:32:20 +00:00
172 lines
3.2 KiB
Plaintext
172 lines
3.2 KiB
Plaintext
NEW
|
||
PREFIX
|
||
AUTO 4,1
|
||
#!/BIN/SH
|
||
Echo "\f\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
|
||
#Clear Screen Test
|
||
IF [ -Z $T ]
|
||
SET T = 0
|
||
FI
|
||
SET T = $T + 1
|
||
echo \f
|
||
echo \n
|
||
read -P "Did the screen clear: " Z
|
||
IF [ $Z = "y" ]
|
||
SET Z = "Y"
|
||
FI
|
||
IF [ $Z = "Y" ]
|
||
IF [ -N $Log ]
|
||
SET P = $P + 1
|
||
echo "ECHO Clear Screen Passed" >> ${Log}
|
||
FI
|
||
ELSE
|
||
IF [ -N $Log ]
|
||
SET F = $F + 1
|
||
echo "ECHO Clear Screen Failed" >> ${Log}
|
||
FI
|
||
FI
|
||
#Backspace Test
|
||
SET T = $T + 1
|
||
echo
|
||
echo "\n"
|
||
echo "----> 1234\b\b5678 <----"
|
||
echo "\n"
|
||
read -P "Is 125678 displayed between the arrows: " Z
|
||
IF [ $Z = "y" ]
|
||
SET Z = "Y"
|
||
FI
|
||
IF [ $Z = "Y" ]
|
||
IF [ -N $Log ]
|
||
SET P = $P + 1
|
||
echo "ECHO Backspace Passed" >> ${Log}
|
||
FI
|
||
ELSE
|
||
IF [ -N $Log ]
|
||
SET F = $F + 1
|
||
echo "ECHO Backspace Failed" >> ${Log}
|
||
FI
|
||
FI
|
||
#Inverse Test
|
||
SET T = $T + 1
|
||
echo
|
||
echo "\n"
|
||
echo "----> abc \e[7mdef\e[0m ghi <----"
|
||
echo "\n"
|
||
read -P "Is def above inversed: " Z
|
||
IF [ $Z = "y" ]
|
||
SET Z = "Y"
|
||
FI
|
||
IF [ $Z = "Y" ]
|
||
IF [ -N $Log ]
|
||
SET P = $P + 1
|
||
echo "ECHO Inverse Passed" >> ${Log}
|
||
FI
|
||
ELSE
|
||
IF [ -N $Log ]
|
||
SET F = $F + 1
|
||
echo "ECHO Inverse Failed" >> ${Log}
|
||
FI
|
||
FI
|
||
#Newline Test
|
||
SET T = $T + 1
|
||
echo
|
||
echo "\n"
|
||
echo "----> abc\ndef <----"
|
||
echo "\n"
|
||
read -P "Does abcdef appear split between two lines: " Z
|
||
IF [ $Z = "y" ]
|
||
SET Z = "Y"
|
||
FI
|
||
IF [ $Z = "Y" ]
|
||
IF [ -N $Log ]
|
||
SET P = $P + 1
|
||
echo "ECHO Newline Passed" >> ${Log}
|
||
FI
|
||
ELSE
|
||
IF [ -N $Log ]
|
||
SET F = $F + 1
|
||
echo "ECHO Newline Failed" >> ${Log}
|
||
FI
|
||
FI
|
||
#Backslash Test
|
||
SET T = $T + 1
|
||
echo
|
||
echo "\n"
|
||
echo "----> \\ <----"
|
||
echo "\n"
|
||
read -P "Is there a blackslash above: " Z
|
||
IF [ $Z = "y" ]
|
||
SET Z = "Y"
|
||
FI
|
||
IF [ $Z = "Y" ]
|
||
IF [ -N $Log ]
|
||
SET P = $P + 1
|
||
echo "ECHO Backslash Passed" >> ${Log}
|
||
FI
|
||
ELSE
|
||
IF [ -N $Log ]
|
||
SET F = $F + 1
|
||
echo "ECHO Backslash Failed" >> ${Log}
|
||
FI
|
||
FI
|
||
#Percent Test
|
||
SET T = $T + 1
|
||
echo
|
||
echo "\n"
|
||
echo "----> \% <----"
|
||
echo "\n"
|
||
read -P "Is there a percent symbol above: " Z
|
||
IF [ $Z = "y" ]
|
||
SET Z = "Y"
|
||
FI
|
||
IF [ $Z = "Y" ]
|
||
IF [ -N $Log ]
|
||
SET P = $P + 1
|
||
echo "ECHO Percent Passed" >> ${Log}
|
||
FI
|
||
ELSE
|
||
IF [ -N $Log ]
|
||
SET F = $F + 1
|
||
echo "ECHO Percent Failed" >> ${Log}
|
||
FI
|
||
FI
|
||
#Newline Suppress Test
|
||
SET T = $T + 1
|
||
echo
|
||
echo "\n"
|
||
echo -N "----> "
|
||
echo -N "One"
|
||
echo -N "Two"
|
||
echo -N "Three"
|
||
echo " <----"
|
||
echo "\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 [ -N $Log ]
|
||
SET P = $P + 1
|
||
echo "ECHO Newline Suppress Passed" >> ${Log}
|
||
FI
|
||
ELSE
|
||
IF [ -N $Log ]
|
||
SET F = $F + 1
|
||
echo "ECHO Newline Suppress Failed" >> ${Log}
|
||
FI
|
||
FI
|
||
echo
|
||
echo "\nEcho Tests Done"
|
||
IF [ -N $Log ]
|
||
echo "ECHO Tests Complete" >> ${Log}
|
||
FI
|
||
SET Z =
|
||
MAN
|
||
TEXT /MAKE/USR/SHARE/TESTS/ECHOTEST
|