diff --git a/README.md b/README.md index aafc17d..aa9ba14 100644 --- a/README.md +++ b/README.md @@ -86,6 +86,7 @@ To test, type: make testclean # only once, unless you want to start over make test ``` +> If Virtual ][ crashes while testing, just `make test` again to restart failed test and continue where it left off. Example output: diff --git a/tests/gentiff.scrp b/tests/gentiff.scrp index 2b16c13..0a506c5 100644 --- a/tests/gentiff.scrp +++ b/tests/gentiff.scrp @@ -6,6 +6,7 @@ on run argv set my_done to item 3 of argv set dsk to item 4 of argv set loadcmd to item 5 of argv + set my_delay to item 6 of argv tell application "Virtual ][" activate @@ -26,6 +27,7 @@ on run argv tell theMachine -- Change to a color screen -- set monochrome screen to false + set scanlines to true set speaker volume to 0.25 if dsk = "1" then @@ -49,7 +51,7 @@ on run argv play my_path & "test.aif" on device "cassette recorder" set speed to maximum - delay 15 + delay my_delay snap screen picture to POSIX path of (my_path & my_done) format tiff end tell delay 1 diff --git a/tests/gentiff.sh b/tests/gentiff.sh index 40f9a8e..70ccab5 100755 --- a/tests/gentiff.sh +++ b/tests/gentiff.sh @@ -1,7 +1,7 @@ #!/bin/bash TIFFDIR=tiffs -C2T=../c2t-96h +C2T=../bin/c2t _gentiff() { @@ -9,13 +9,14 @@ _gentiff() TIFF=$2 DSK=$3 LOAD="$4" + DELAY=$5 if [ "$DSK" = "1" ] then dd if=/dev/zero of=test.dsk bs=1k count=140 >/dev/null 2>&1 fi - if ! OUTPUT=$(osascript gentiff.scrp test.dsk $MACHINE $TIFF $DSK "$LOAD") + if ! OUTPUT=$(osascript gentiff.scrp test.dsk $MACHINE $TIFF $DSK "$LOAD" $DELAY) then echo return 1 @@ -41,7 +42,7 @@ TIFF=${TIFFDIR}/dskiie.tiff if [ ! -s "$TIFF" ] then eval $C2T images/zork.dsk test.aif - if ! _gentiff iie $TIFF 1 "LOAD" + if ! _gentiff iie $TIFF 1 "LOAD" 15 then echo "$TIFF failed" exit 1 @@ -52,7 +53,7 @@ TIFF=${TIFFDIR}/dskiip.tiff if [ ! -s "$TIFF" ] then eval $C2T images/zork.dsk test.aif - if ! _gentiff iip $TIFF 1 "LOAD" + if ! _gentiff iip $TIFF 1 "LOAD" 15 then echo "$TIFF failed" exit 1 @@ -63,7 +64,7 @@ TIFF=${TIFFDIR}/mpiie.tiff if [ ! -s "$TIFF" ] then eval $C2T -2bf images/moon.patrol,801 test.aif - if ! _gentiff iie $TIFF 0 "LOAD" + if ! _gentiff iie $TIFF 0 "LOAD" 15 then echo "$TIFF failed" exit 1 @@ -74,7 +75,18 @@ TIFF=${TIFFDIR}/mpii.tiff if [ ! -s "$TIFF" ] then eval $C2T -2af images/moon.patrol,801 test.aif - if ! _gentiff ii $TIFF 0 "800.A00R 800G" + if ! _gentiff ii $TIFF 0 "800.A00R 800G" 15 + then + echo "$TIFF failed" + exit 1 + fi +fi + +TIFF=${TIFFDIR}/spiie.tiff +if [ ! -s "$TIFF" ] +then + eval $C2T -2bc8 images/super_puckman,800 test.aif + if ! _gentiff iie $TIFF 0 "LOAD" 12 then echo "$TIFF failed" exit 1 diff --git a/tests/images/super_puckman b/tests/images/super_puckman new file mode 100644 index 0000000..10f7d1d Binary files /dev/null and b/tests/images/super_puckman differ diff --git a/tests/quicktest.md b/tests/quicktest.md index 139cefb..fccc613 100644 --- a/tests/quicktest.md +++ b/tests/quicktest.md @@ -1,8 +1,9 @@ ## Quick Test -| Test | Command | Input | Machine | Load | Compare | Offset | Timeout | -|:----:|------------------------------|-----------------|---------|---------------|-------------|:------:|:-------:| -| 1 | ../bin/c2t-96h | zork.dsk | iie | LOAD | dskiie.tiff | 0 | 25 | -| 2 | ../bin/c2t-96h -2bcf | moon.patrol,801 | iie | LOAD | mpiie.tiff | 0 | 25 | +| Test | Command | Input | Machine | Load | Compare | Offset | Timeout | +|:----:|------------------------------|-------------------|---------|---------------|-------------|:------:|:-------:| +| 1 | ../bin/c2t-96h | zork.dsk | iie | LOAD | dskiie.tiff | 0 | 25 | +| 2 | ../bin/c2t-96h -2bcf | moon.patrol,801 | iie | LOAD | mpiie.tiff | 0 | 25 | +| 3 | ../bin/c2t-96h -2bc8 | super_puckman,800 | iie | LOAD | spiie.tiff | 0 | 25 | ### Future Edit Instructions Here diff --git a/tests/test.md b/tests/test.md index d6c385c..116eb54 100644 --- a/tests/test.md +++ b/tests/test.md @@ -1,19 +1,26 @@ ## Automated Tests -| Test | Command | Input | Machine | Load | Compare | Offset | Timeout | -|:----:|-------------------------------|-----------------|---------|---------------|-------------|:------:|:-------:| -| 1 | ../bin/c2t-96h | zork.dsk | iie | LOAD | dskiie.tiff | 0 | 25 | -| 2 | ../bin/c2t-96h | dd.po | iie | LOAD | dskiie.tiff | 0 | 25 | -| 3 | ../bin/c2t-96h | zork.dsk | iip | LOAD | dskiip.tiff | 0 | 25 | -| 4 | ../bin/c2t-96h | dd.po | iip | LOAD | dskiip.tiff | 0 | 25 | -| 5 | ../bin/c2t-96h -2bcf | moon.patrol,801 | iie | LOAD | mpiie.tiff | 0 | 25 | -| 6 | ../bin/c2t-96h -2bcf | moon.patrol,801 | iip | LOAD | mpiie.tiff | 0 | 25 | -| 7 | ../bin/c2t-96h -2acf | moon.patrol,801 | ii | 800.A00R 800G | mpii.tiff | 0 | 25 | -| 8 | wine ../bin/c2t-96h.exe | zork.dsk | iie | LOAD | dskiie.tiff | 0 | 25 | -| 9 | wine ../bin/c2t-96h.exe | dd.po | iie | LOAD | dskiie.tiff | 0 | 25 | -| 10 | wine ../bin/c2t-96h.exe | zork.dsk | iip | LOAD | dskiip.tiff | 0 | 25 | -| 11 | wine ../bin/c2t-96h.exe | dd.po | iip | LOAD | dskiip.tiff | 0 | 25 | -| 12 | wine ../bin/c2t-96h.exe -2bcf | moon.patrol,801 | iie | LOAD | mpiie.tiff | 0 | 25 | -| 13 | wine ../bin/c2t-96h.exe -2acf | moon.patrol,801 | ii | 800.A00R 800G | mpii.tiff | 0 | 25 | +| Test | Command | Input | Machine | Load | Compare | Offset | Timeout | +|:----:|-------------------------------|-------------------|---------|---------------|-------------|:------:|:-------:| +| 1 | ../bin/c2t-96h | zork.dsk | iie | LOAD | dskiie.tiff | 0 | 25 | +| 2 | ../bin/c2t-96h | dd.po | iie | LOAD | dskiie.tiff | 0 | 25 | +| 3 | ../bin/c2t-96h | zork.dsk | iip | LOAD | dskiip.tiff | 0 | 25 | +| 4 | ../bin/c2t-96h | dd.po | iip | LOAD | dskiip.tiff | 0 | 25 | +| 5 | ../bin/c2t-96h -2bcf | moon.patrol,801 | iie | LOAD | mpiie.tiff | 0 | 25 | +| 6 | ../bin/c2t-96h -2bcf | moon.patrol,801 | iip | LOAD | mpiie.tiff | 0 | 25 | +| 7 | ../bin/c2t-96h -2acf | moon.patrol,801 | ii | 800.A00R 800G | mpii.tiff | 0 | 25 | +| 8 | ../bin/c2t-96h -2bc8 | super_puckman,800 | iie | LOAD | spiie.tiff | 0 | 25 | +| 9 | ../bin/c2t-96h -2bc8 | super_puckman,800 | iip | LOAD | spiie.tiff | 0 | 25 | +| 10 | ../bin/c2t-96h -2ac8 | super_puckman,800 | ii | 800.A00R 800G | spiie.tiff | 0 | 25 | +| 11 | wine ../bin/c2t-96h.exe | zork.dsk | iie | LOAD | dskiie.tiff | 0 | 25 | +| 12 | wine ../bin/c2t-96h.exe | dd.po | iie | LOAD | dskiie.tiff | 0 | 25 | +| 13 | wine ../bin/c2t-96h.exe | zork.dsk | iip | LOAD | dskiip.tiff | 0 | 25 | +| 14 | wine ../bin/c2t-96h.exe | dd.po | iip | LOAD | dskiip.tiff | 0 | 25 | +| 15 | wine ../bin/c2t-96h.exe -2bcf | moon.patrol,801 | iie | LOAD | mpiie.tiff | 0 | 25 | +| 16 | wine ../bin/c2t-96h.exe -2bcf | moon.patrol,801 | iip | LOAD | mpiie.tiff | 0 | 25 | +| 17 | wine ../bin/c2t-96h.exe -2acf | moon.patrol,801 | ii | 800.A00R 800G | mpii.tiff | 0 | 25 | +| 18 | wine ../bin/c2t-96h.exe -2bc8 | super_puckman,800 | iie | LOAD | spiie.tiff | 0 | 25 | +| 19 | wine ../bin/c2t-96h.exe -2bc8 | super_puckman,800 | iip | LOAD | spiie.tiff | 0 | 25 | +| 20 | wine ../bin/c2t-96h.exe -2ac8 | super_puckman,800 | ii | 800.A00R 800G | spiie.tiff | 0 | 25 | ### Future Edit Instructions Here diff --git a/tests/test.scrp b/tests/test.scrp index 27ec8a4..8d861ea 100644 --- a/tests/test.scrp +++ b/tests/test.scrp @@ -10,7 +10,7 @@ on run argv tell application "Virtual ][" activate - delay 1 + delay 1.5 -- Close all open machines close every machine saving no -- Create a new (AppleIIe, AppleIIPlus, AppleII) @@ -63,7 +63,7 @@ on run argv -- delay 3 end tell - delay 1 + delay 1.5 close every machine saving no quit end tell diff --git a/tests/tiffs/spiie.tiff b/tests/tiffs/spiie.tiff new file mode 100644 index 0000000..7c314c7 Binary files /dev/null and b/tests/tiffs/spiie.tiff differ