@@ -11,16 +11,61 @@ DISKARGS="-hard1 $HARDIMG"
1111-- however.
1212
1313test .Step (
14- " Stack exhaustion (takes about 122 seconds to run)" ,
14+ " Restarting launcher (takes about 122 seconds to run)" ,
1515 function ()
16- local cpu = manager . machine . devices [ " :maincpu " ]
16+ a2d . OpenPath ( " /A2.DESKTOP " )
1717
1818 -- Prior to fix, crashes around iteration 40
19- for i = 1 ,50 do
20- -- print(string.format("i=%d SP=%04X", i, cpu.state.SP.value))
21- a2d .CloseAllWindows ()
22- a2d .OpenPath (" /A2.DESKTOP/DESKTOP.SYSTEM" )
19+ local cpu = manager .machine .devices [" :maincpu" ]
20+ for i = 1 , 50 do
21+ a2d .SelectAndOpen (" DESKTOP.SYSTEM" )
22+ a2d .WaitForRestart ()
23+ print (string.format (" i=%d SP=%02X" , i , cpu .state .SP .value ))
24+ test .Expect (not apple2 .IsCrashedToMonitor (), " should not have crashed to monitor" )
25+ test .ExpectGreaterThan (cpu .state .SP .value , 0x120 , " stack should not be exausted" )
26+ end
27+
28+ a2d .CloseAllWindows ()
29+ end )
30+
31+ test .Step (
32+ " Running external programs - DeskTop" ,
33+ function ()
34+ a2d .OpenPath (" /A2.DESKTOP/SAMPLE.MEDIA" )
35+
36+ -- Prior to fix, hangs around iteration 60 (but doesn't crash to monitor)
37+ local cpu = manager .machine .devices [" :maincpu" ]
38+ for i = 1 , 70 do
39+ a2d .SelectAndOpen (" KARATEKA.YELL" )
2340 a2d .WaitForRestart ()
41+ print (string.format (" i=%d SP=%02X" , i , cpu .state .SP .value ))
2442 test .Expect (not apple2 .IsCrashedToMonitor (), " should not have crashed to monitor" )
43+ test .ExpectGreaterThan (cpu .state .SP .value , 0x120 , " stack should not be exausted" )
2544 end
45+
46+ a2d .CloseAllWindows ()
47+ end )
48+
49+ test .Step (
50+ " Running external programs - Selector" ,
51+ function ()
52+ a2d .AddShortcut (" /A2.DESKTOP/SAMPLE.MEDIA/KARATEKA.YELL" )
53+ a2d .ToggleOptionShowShortcutsOnStartup ()
54+ a2d .Reboot ()
55+
56+ -- Prior to fix, runs out of stack around iteration 30 (but doesn't crash!)
57+ local cpu = manager .machine .devices [" :maincpu" ]
58+ for i = 1 , 40 do
59+ apple2 .Type (" 1" )
60+ a2d .DialogOK ()
61+ a2d .WaitForRestart ()
62+ print (string.format (" i=%d SP=%02X" , i , cpu .state .SP .value ))
63+ test .Expect (not apple2 .IsCrashedToMonitor (), " should not have crashed to monitor" )
64+ test .ExpectGreaterThan (cpu .state .SP .value , 0x120 , " stack should not be exausted" )
65+ end
66+
67+ apple2 .Type (" D" ) -- Desktop
68+ a2d .WaitForRestart ()
69+ a2d .DeletePath (" /A2.DESKTOP/LOCAL" )
70+ a2d .Reboot ()
2671end )
0 commit comments