mirror of
https://github.com/A2osX/A2osX.git
synced 2025-01-26 18:32:56 +00:00
Updated issue list, updated tests and make with updated tests. Removed some test files that have been combined into other tests.
This commit is contained in:
parent
eb163a06d8
commit
78a02b11b6
Binary file not shown.
Binary file not shown.
@ -65,6 +65,10 @@ SET F = 0
|
||||
ECHO "\n----------------------------------------\n" >> ${Log}
|
||||
. ECHOTEST
|
||||
ECHO "\n----------------------------------------\n" >> ${Log}
|
||||
. VTTEST
|
||||
ECHO "\n----------------------------------------\n" >> ${Log}
|
||||
. CATTEST
|
||||
ECHO "\n----------------------------------------\n" >> ${Log}
|
||||
. ARGTEST
|
||||
ECHO "\n----------------------------------------\n" >> ${Log}
|
||||
. IFLEVEL
|
||||
@ -79,7 +83,7 @@ ECHO "\n----------------------------------------\n" >> ${Log}
|
||||
ECHO "\n----------------------------------------\n" >> ${Log}
|
||||
. IFNUMTEST
|
||||
ECHO "\n----------------------------------------\n" >> ${Log}
|
||||
. CATTEST
|
||||
. WHILETEST
|
||||
#
|
||||
# End of Tests
|
||||
#
|
||||
|
@ -1,21 +0,0 @@
|
||||
NEW
|
||||
PREFIX
|
||||
AUTO 4,1
|
||||
#!/BIN/SH
|
||||
#
|
||||
# test CD command gives errors back
|
||||
#
|
||||
IF [ -D HHH ]
|
||||
ELSE
|
||||
MD HHH
|
||||
FI
|
||||
CD HHH
|
||||
echo "return code was $?"
|
||||
CD ..
|
||||
echo "return code was $?"
|
||||
CD ...
|
||||
echo "return code was $?"
|
||||
CD aaa
|
||||
echo "return code was $?"
|
||||
MAN
|
||||
TEXT /MAKE/USR/SHARE/TESTS/CDTEST
|
@ -15,6 +15,23 @@ ECHO $PWD
|
||||
ECHO POPPING
|
||||
POPD
|
||||
ECHO $PWD
|
||||
|
||||
#
|
||||
# test CD command gives errors back
|
||||
#
|
||||
IF [ -D HHH ]
|
||||
ELSE
|
||||
MD HHH
|
||||
FI
|
||||
CD HHH
|
||||
echo "return code was $?"
|
||||
CD ..
|
||||
echo "return code was $?"
|
||||
CD ...
|
||||
echo "return code was $?"
|
||||
CD aaa
|
||||
echo "return code was $?"
|
||||
|
||||
ECHO END OF TEST
|
||||
MAN
|
||||
TEXT /MAKE/USR/SHARE/TESTS/PUSHDPOPDTEST
|
||||
|
250
TESTS/VTTEST.txt
250
TESTS/VTTEST.txt
@ -5,13 +5,253 @@ AUTO 4,1
|
||||
#
|
||||
#
|
||||
#
|
||||
ECHO "\f VT100 Code Echo Tests"
|
||||
ECHO "\f\n A2osX Terminal Tests"
|
||||
ECHO
|
||||
ECHO -N "\e[5;5H"
|
||||
ECHO "This Text Should be on line 5 column 5"
|
||||
ECHO "This tests the various Terminal/Console/Screen attributes"
|
||||
ECHO "Available in A2osX scripts and applications."
|
||||
IF [ -N $Log ]
|
||||
ECHO "Begin A2osX Terminal Tests" >> ${Log}
|
||||
ELSE
|
||||
SET T = 0
|
||||
SET F = 0
|
||||
SET P = 0
|
||||
FI
|
||||
SET T = $T + 1
|
||||
ECHO -N "\e[10;10H"
|
||||
ECHO "This Text Should be on line 10 column 10"
|
||||
ECHO
|
||||
ECHO -N "\e[10;20H"
|
||||
ECHO "This on line 10 Column 20"
|
||||
ECHO -N "\e[20;5H"
|
||||
READ -P "Does the line above appear to be in the right location (Y/N)?" R
|
||||
ECHO
|
||||
IF [ $R = "y" ]
|
||||
SET R = "Y"
|
||||
FI
|
||||
ECHO "\f"
|
||||
ECHO -N "\e[9;64H"
|
||||
IF [ $R = "Y" ]
|
||||
ECHO "Test 1 PASSED"
|
||||
SET P = $P + 1
|
||||
IF [ -N $Log ]
|
||||
ECHO "A2osX Terminal Test 1 PASSED" >> ${Log}
|
||||
FI
|
||||
ELSE
|
||||
SET F = $F + 1
|
||||
IF [ -N $Log ]
|
||||
ECHO "A2osX Terminal Test 1 FAILED" >> ${Log}
|
||||
FI
|
||||
ECHO "Test 1 FAILED"
|
||||
FI
|
||||
#
|
||||
# Draw Box in middle of screen
|
||||
#
|
||||
# Screen is 80 x 24, make box 40 x 10 centered so
|
||||
# starting at 7 - 20
|
||||
#
|
||||
SET T = $T + 1
|
||||
ECHO -N "\e[7;20H"
|
||||
ECHO "\e[7m \e[0m"
|
||||
SET LINE = 8
|
||||
WHILE [ $LINE -NE 17 ]
|
||||
ECHO -N "\e[${LINE};20H"
|
||||
ECHO "\e[7m \e[0m \e[7m \e[0m"
|
||||
SET LINE = $LINE + 1
|
||||
LOOP
|
||||
ECHO -N "\e[17;20H"
|
||||
ECHO "\e[7m \e[0m"
|
||||
ECHO
|
||||
ECHO -N "\e[20;5H\e[K"
|
||||
READ -P "Is there a box centered on the screen above (Y/N)?" R
|
||||
ECHO
|
||||
IF [ $R = "y" ]
|
||||
SET R = "Y"
|
||||
FI
|
||||
ECHO -N "\e[10;64H"
|
||||
IF [ $R = "Y" ]
|
||||
ECHO "Test 2 PASSED"
|
||||
SET P = $P + 1
|
||||
IF [ -N $Log ]
|
||||
ECHO "A2osX Terminal Test 2 PASSED" >> ${Log}
|
||||
FI
|
||||
ELSE
|
||||
SET F = $F + 1
|
||||
IF [ -N $Log ]
|
||||
ECHO "A2osX Terminal Test 2 FAILED" >> ${Log}
|
||||
FI
|
||||
ECHO "Test 2 FAILED"
|
||||
FI
|
||||
#
|
||||
# Now put something in center of box
|
||||
#
|
||||
SET T = $T + 1
|
||||
ECHO -N "\e[12;30HA2osX is the Greatest!"
|
||||
ECHO -N "\e[20;5H\e[K"
|
||||
READ -P "Did a phrase appear centered in the box (Y/N)?" R
|
||||
ECHO
|
||||
IF [ $R = "y" ]
|
||||
SET R = "Y"
|
||||
FI
|
||||
ECHO -N "\e[11;64H"
|
||||
IF [ $R = "Y" ]
|
||||
ECHO "Test 3 PASSED"
|
||||
SET P = $P + 1
|
||||
IF [ -N $Log ]
|
||||
ECHO "A2osX Terminal Test 3 PASSED" >> ${Log}
|
||||
FI
|
||||
ELSE
|
||||
SET F = $F + 1
|
||||
IF [ -N $Log ]
|
||||
ECHO "A2osX Terminal Test 3 FAILED" >> ${Log}
|
||||
FI
|
||||
ECHO "Test 3 FAILED"
|
||||
FI
|
||||
#
|
||||
# Now inverse the phrase in the box \e[7m \e[0m
|
||||
#
|
||||
SET T = $T + 1
|
||||
ECHO -N "\e[12;30H\e[7mA2osX is the Greatest!\e[0m"
|
||||
ECHO -N "\e[20;5H\e[K"
|
||||
READ -P "Is the phrase now in inverse (Y/N)?" R
|
||||
ECHO
|
||||
IF [ $R = "y" ]
|
||||
SET R = "Y"
|
||||
FI
|
||||
ECHO -N "\e[12;64H"
|
||||
IF [ $R = "Y" ]
|
||||
ECHO "Test 4 PASSED"
|
||||
SET P = $P + 1
|
||||
IF [ -N $Log ]
|
||||
ECHO "A2osX Terminal Test 4 PASSED" >> ${Log}
|
||||
FI
|
||||
ELSE
|
||||
SET F = $F + 1
|
||||
IF [ -N $Log ]
|
||||
ECHO "A2osX Terminal Test 4 FAILED" >> ${Log}
|
||||
FI
|
||||
ECHO "Test 4 FAILED"
|
||||
FI
|
||||
#
|
||||
# Put up full line Title Bar above box
|
||||
#
|
||||
SET T = $T + 1
|
||||
ECHO -N "\e[2;1H"
|
||||
ECHO -N "------------------------------ Full Width Title ------------------------------"
|
||||
ECHO -N "\e[20;5H\e[K"
|
||||
READ -P "Has a title line appeared on line 2 (Y/N)?" R
|
||||
ECHO
|
||||
IF [ $R = "y" ]
|
||||
SET R = "Y"
|
||||
FI
|
||||
ECHO -N "\e[13;64H"
|
||||
IF [ $R = "Y" ]
|
||||
ECHO "Test 5 PASSED"
|
||||
SET P = $P + 1
|
||||
IF [ -N $Log ]
|
||||
ECHO "A2osX Terminal Test 5 PASSED" >> ${Log}
|
||||
FI
|
||||
ELSE
|
||||
SET F = $F + 1
|
||||
IF [ -N $Log ]
|
||||
ECHO "A2osX Terminal Test 5 FAILED" >> ${Log}
|
||||
FI
|
||||
ECHO "Test 5 FAILED"
|
||||
FI
|
||||
#
|
||||
# Now Blank right half of line
|
||||
#
|
||||
SET T = $T + 1
|
||||
ECHO -N "\e[2;41H\e[K"
|
||||
ECHO -N "\e[20;5H\e[K"
|
||||
READ -P "Did the right half of the title disappear (Y/N)?" R
|
||||
ECHO
|
||||
IF [ $R = "y" ]
|
||||
SET R = "Y"
|
||||
FI
|
||||
ECHO -N "\e[14;64H"
|
||||
IF [ $R = "Y" ]
|
||||
ECHO "Test 6 PASSED"
|
||||
SET P = $P + 1
|
||||
IF [ -N $Log ]
|
||||
ECHO "A2osX Terminal Test 6 PASSED" >> ${Log}
|
||||
FI
|
||||
ELSE
|
||||
SET F = $F + 1
|
||||
IF [ -N $Log ]
|
||||
ECHO "A2osX Terminal Test 6 FAILED" >> ${Log}
|
||||
FI
|
||||
ECHO "Test 6 FAILED"
|
||||
FI
|
||||
#
|
||||
# Put up full line Title Bar above box
|
||||
#
|
||||
ECHO -N "\e[2;1H"
|
||||
ECHO -N "------------------------------ Full Width Title ------------------------------"
|
||||
ECHO -N "\e[20;5H\e[K"
|
||||
READ -P "Has a title line appeared on line 2 (Y/N)?" R
|
||||
ECHO
|
||||
#
|
||||
# Now Blank left half of line
|
||||
#
|
||||
SET T = $T + 1
|
||||
ECHO -N "\e[2;40H\e[1K"
|
||||
ECHO -N "\e[20;5H\e[K"
|
||||
READ -P "Did the right half of the title disappear (Y/N)?" R
|
||||
ECHO
|
||||
IF [ $R = "y" ]
|
||||
SET R = "Y"
|
||||
FI
|
||||
ECHO -N "\e[15;64H"
|
||||
IF [ $R = "Y" ]
|
||||
ECHO "Test 7 PASSED"
|
||||
SET P = $P + 1
|
||||
IF [ -N $Log ]
|
||||
ECHO "A2osX Terminal Test 7 PASSED" >> ${Log}
|
||||
FI
|
||||
ELSE
|
||||
SET F = $F + 1
|
||||
IF [ -N $Log ]
|
||||
ECHO "A2osX Terminal Test 7 FAILED" >> ${Log}
|
||||
FI
|
||||
ECHO "Test 7 FAILED"
|
||||
FI
|
||||
#
|
||||
# Put up full line Title Bar above box
|
||||
#
|
||||
ECHO -N "\e[2;1H"
|
||||
ECHO -N "------------------------------ Full Width Title ------------------------------"
|
||||
ECHO -N "\e[20;5H\e[K"
|
||||
READ -P "Has a title line appeared on line 2 (Y/N)?" R
|
||||
ECHO
|
||||
#
|
||||
# Now Blank entire line
|
||||
#
|
||||
SET T = $T + 1
|
||||
ECHO -N "\e[2;40H\e[2K"
|
||||
ECHO -N "\e[20;5H\e[K"
|
||||
READ -P "Did the entire title line disappear (Y/N)?" R
|
||||
ECHO
|
||||
IF [ $R = "y" ]
|
||||
SET R = "Y"
|
||||
FI
|
||||
ECHO -N "\e[16;64H"
|
||||
IF [ $R = "Y" ]
|
||||
ECHO "Test 8 PASSED"
|
||||
SET P = $P + 1
|
||||
IF [ -N $Log ]
|
||||
ECHO "A2osX Terminal Test 8 PASSED" >> ${Log}
|
||||
FI
|
||||
ELSE
|
||||
SET F = $F + 1
|
||||
IF [ -N $Log ]
|
||||
ECHO "A2osX Terminal Test 8 FAILED" >> ${Log}
|
||||
FI
|
||||
ECHO "Test 8 FAILED"
|
||||
FI
|
||||
# End of Tests
|
||||
IF [ -N $Log ]
|
||||
ECHO "End A2osX Terminal Tests" >> ${Log}
|
||||
FI
|
||||
ECHO -N "\e[20;5H\e[K"
|
||||
ECHO "\e[20;15HEnd of Tests"
|
||||
ECHO
|
||||
MAN
|
||||
TEXT /MAKE/USR/SHARE/TESTS/VTTEST
|
||||
|
@ -1,16 +0,0 @@
|
||||
NEW
|
||||
PREFIX
|
||||
AUTO 4,1
|
||||
#!/BIN/SH
|
||||
#
|
||||
#Clear Screen
|
||||
#
|
||||
ECHO \e[2J
|
||||
ECHO " VT100 Code Echo Tests
|
||||
ECHO "\e[10B\e[10CDown 10 Righ 10
|
||||
ECHO "\e[5A\e[5CUp 5 Right 5
|
||||
ECHO "\e2020I should be at line 20 col 20
|
||||
ECHO
|
||||
ECHO "\n\nEnd Test
|
||||
MAN
|
||||
TEXT /MAKE/USR/SHARE/TESTS/VTTEST2
|
@ -1,36 +0,0 @@
|
||||
NEW
|
||||
PREFIX
|
||||
AUTO 4,1
|
||||
#!/BIN/SH
|
||||
#
|
||||
# Testing some vt100 codes
|
||||
#
|
||||
# Clear Screen Then Write 12 lines
|
||||
echo -N \f
|
||||
echo This is a line of text 1
|
||||
echo This is a line of text 2
|
||||
echo This is a line of text 3
|
||||
echo This is a line of text 4
|
||||
pause
|
||||
echo erase end of line 2
|
||||
echo then erase begin line 3
|
||||
echo then cler line 1
|
||||
echo -N "\e[2;10H\e[K"
|
||||
echo -N "\e[3;10H\e[1K"
|
||||
echo -N "\e[1;10H\e[2K"
|
||||
echo -N "\e[5;0H"
|
||||
pause
|
||||
echo This is a line of text 5
|
||||
echo This is a line of text 6
|
||||
echo This is a line of text 7
|
||||
echo This is a line of text 8
|
||||
echo This is a line of text 9
|
||||
echo This is a line of text 10
|
||||
echo This is a line of text 11
|
||||
echo This is a line of text 12
|
||||
echo -N "\e[A\e[A\e[A\e[AAmI On Line 9"
|
||||
echo -N "\e[H"
|
||||
echo "I should be on the top line"
|
||||
echo "\e[20;0H"
|
||||
MAN
|
||||
TEXT /MAKE/USR/SHARE/TESTS/VTTEST3
|
@ -5,12 +5,84 @@ AUTO 4,1
|
||||
#
|
||||
# Tests the While Loop function of shell
|
||||
#
|
||||
echo This should display 4 lines of counting
|
||||
set count = 1
|
||||
while [ $count -lt 5 ]
|
||||
echo "Count is ${count}"
|
||||
set count = $count + 1
|
||||
echo "\f\n\n WHILE LOOP Tests"
|
||||
echo "\n\nThis script tests the WHILE LOOP construct."
|
||||
echo "\nThe First tests an incrementing loop adding up the"
|
||||
echo "vaues, in this way it demonstrates creating a Fibonachi"
|
||||
echo "number maker. Test 2 is a decremental loop and Test 3"
|
||||
echo "mixes the two."
|
||||
echo
|
||||
IF [ -N $Log ]
|
||||
ECHO "Begin WHILE LOOP Tests" >> ${Log}
|
||||
ELSE
|
||||
SET T = 0
|
||||
SET F = 0
|
||||
SET P = 0
|
||||
FI
|
||||
set counter = 1
|
||||
set total = 0
|
||||
while [ $counter -lt 16 ]
|
||||
set total = $total + $counter
|
||||
ECHO -N "\e[14;10HTest 1 - Counter : ${count} Total : ${total}"
|
||||
set counter = $counter + 1
|
||||
loop
|
||||
echo End of Test
|
||||
IF [ $total -eq 120 ]
|
||||
IF [ -N $Log ]
|
||||
SET T = $T + 1
|
||||
SET P = $P + 1
|
||||
ECHO "WHILE LOOP Test 1 Passed" >> ${Log}
|
||||
FI
|
||||
ELSE
|
||||
IF [ -N $Log ]
|
||||
SET T = $T + 1
|
||||
SET F = $F + 1
|
||||
ECHO "WHILE LOOP Test 1 Failed" >> ${Log}
|
||||
FI
|
||||
FI
|
||||
set counter = 100
|
||||
set total = 10000
|
||||
while [ $counter -gt 90 ]
|
||||
set total = $total - $counter
|
||||
ECHO -N "\e[16;10HTest 2 - Counter : ${count} Total : ${total}"
|
||||
set counter = $counter - 1
|
||||
loop
|
||||
IF [ $total -eq 9045 ]
|
||||
IF [ -N $Log ]
|
||||
SET T = $T + 1
|
||||
SET P = $P + 1
|
||||
ECHO "WHILE LOOP Test 2 Passed" >> ${Log}
|
||||
FI
|
||||
ELSE
|
||||
IF [ -N $Log ]
|
||||
SET T = $T + 1
|
||||
SET F = $F + 1
|
||||
ECHO "WHILE LOOP Test 2 Failed" >> ${Log}
|
||||
FI
|
||||
FI
|
||||
set counter = 0
|
||||
set total = 2000
|
||||
while [ $total -ne 0 ]
|
||||
set total = $total - 100
|
||||
set counter = $counter + 1
|
||||
ECHO -N "\e[18;10HTest 3 - Counter : ${count} Total : ${total}"
|
||||
loop
|
||||
IF [ $counter -eq 20 ]
|
||||
IF [ -N $Log ]
|
||||
SET T = $T + 1
|
||||
SET P = $P + 1
|
||||
ECHO "WHILE LOOP Test 3 Passed" >> ${Log}
|
||||
FI
|
||||
ELSE
|
||||
IF [ -N $Log ]
|
||||
SET T = $T + 1
|
||||
SET F = $F + 1
|
||||
ECHO "WHILE LOOP Test 3 Failed" >> ${Log}
|
||||
FI
|
||||
FI
|
||||
ECHO
|
||||
ECHO
|
||||
IF [ -N $Log ]
|
||||
ECHO "End WHILE LOOP Tests" >> ${Log}
|
||||
FI
|
||||
MAN
|
||||
TEXT /MAKE/USR/SHARE/TESTS/WHILETEST
|
||||
|
Loading…
x
Reference in New Issue
Block a user