mirror of
https://github.com/Michaelangel007/c2t.git
synced 2024-11-25 14:31:02 +00:00
added more tests, minor updates, cleanup
This commit is contained in:
parent
0ed8296925
commit
8609827333
@ -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: <https://youtu.be/FCOb4f2hYN8>
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
BIN
tests/images/super_puckman
Normal file
BIN
tests/images/super_puckman
Normal file
Binary file not shown.
@ -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 |
|
||||
| 3 | ../bin/c2t-96h -2bc8 | super_puckman,800 | iie | LOAD | spiie.tiff | 0 | 25 |
|
||||
|
||||
### Future Edit Instructions Here
|
||||
|
@ -1,7 +1,7 @@
|
||||
## 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 |
|
||||
@ -9,11 +9,18 @@
|
||||
| 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 |
|
||||
| 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
|
||||
|
@ -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
|
||||
|
BIN
tests/tiffs/spiie.tiff
Normal file
BIN
tests/tiffs/spiie.tiff
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user