mirror of https://github.com/datajerk/c2d.git
added emulated tests
This commit is contained in:
parent
aea92e1415
commit
12ea7313bd
3
Makefile
3
Makefile
|
@ -1,4 +1,5 @@
|
|||
|
||||
EMUTEST = 1
|
||||
WIN32GCC = /usr/local/gcc-4.8.0-qt-4.8.4-for-mingw32/win32-gcc/bin/i586-mingw32-gcc
|
||||
|
||||
all: bin/c2d bin/text2page bin/page2text
|
||||
|
@ -36,5 +37,5 @@ gameserverclient.text: Makefile
|
|||
figlet -c -w 40 -f slant "Game Server Online Client" >$@
|
||||
|
||||
test: gameserverclient gameserverclient.mon gameserverclient.text dist
|
||||
./test.sh
|
||||
EMU=$(EMUTEST) ./test.sh
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,51 @@
|
|||
on run argv
|
||||
|
||||
set my_path to (system attribute "PWD") & "/"
|
||||
set my_disk to item 1 of argv
|
||||
set my_done1 to item 2 of argv
|
||||
set my_done2 to item 3 of argv
|
||||
set my_timeout1 to item 4 of argv
|
||||
set my_timeout2 to item 5 of argv
|
||||
|
||||
tell application "Virtual ]["
|
||||
activate
|
||||
delay 1.5
|
||||
-- Close all open machines
|
||||
close every machine saving no
|
||||
-- Create a new (AppleIIe)
|
||||
set theMachine to (make new AppleIIe)
|
||||
tell theMachine
|
||||
-- Change to a color screen
|
||||
-- set monochrome screen to false
|
||||
set scanlines to true
|
||||
set speaker volume to 0.25
|
||||
insert my_path & my_disk into device "S6D1"
|
||||
-- Now wait for the startup screen
|
||||
-- delay 0.5
|
||||
|
||||
try
|
||||
with timeout of my_timeout1 seconds
|
||||
waiting until screen equals imagefile POSIX path of (my_path & my_done1)
|
||||
end timeout
|
||||
on error
|
||||
return "ERROR: TIMEOUT: Virtual ][ screen != " & my_done1
|
||||
end try
|
||||
|
||||
try
|
||||
with timeout of my_timeout2 seconds
|
||||
waiting until screen equals imagefile POSIX path of (my_path & my_done2)
|
||||
end timeout
|
||||
on error
|
||||
return "ERROR: TIMEOUT: Virtual ][ screen != " & my_done2
|
||||
end try
|
||||
|
||||
-- short test of image, not necessary, next 3 lines can be removed
|
||||
-- delay 1
|
||||
|
||||
end tell
|
||||
-- delay 1.5
|
||||
close every machine saving no
|
||||
quit
|
||||
end tell
|
||||
end run
|
||||
|
38
test.sh
38
test.sh
|
@ -22,6 +22,25 @@ else
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if ((EMU == 1))
|
||||
then
|
||||
echo
|
||||
echo -n "Emulator Test..."
|
||||
if ! OUTPUT=$(osascript test.scrp gameserverclient.dsk gameserverclient.tiff gameserverclient.tiff 15 15)
|
||||
then
|
||||
echo FAILED
|
||||
exit 1
|
||||
fi
|
||||
if echo $OUTPUT | grep ERROR >/dev/null 2>&1
|
||||
then
|
||||
echo FAILED
|
||||
echo $OUTPUT
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
echo PASSED
|
||||
fi
|
||||
|
||||
rm -f ${BIN}.dsk
|
||||
echo
|
||||
echo "Testing Windows c2d..."
|
||||
|
@ -57,6 +76,25 @@ else
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if ((EMU == 1))
|
||||
then
|
||||
echo
|
||||
echo -n "Emulator Test..."
|
||||
if ! OUTPUT=$(osascript test.scrp gameserverclient.dsk gameserverclientsplash.tiff gameserverclient.tiff 15 15)
|
||||
then
|
||||
echo FAILED
|
||||
exit 1
|
||||
fi
|
||||
if echo $OUTPUT | grep ERROR >/dev/null 2>&1
|
||||
then
|
||||
echo FAILED
|
||||
echo $OUTPUT
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
echo PASSED
|
||||
fi
|
||||
|
||||
rm -f ${BIN}.dsk
|
||||
echo
|
||||
echo "Testing Windows c2d textpage..."
|
||||
|
|
Loading…
Reference in New Issue