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