|
| 1 | +--[[ BEGINCONFIG ======================================== |
| 2 | +
|
| 3 | +MODEL="apple2cp" |
| 4 | +MODELARGS="-ramsize 1152K -gameio joy" |
| 5 | +DISKARGS="-flop3 $HARDIMG" |
| 6 | +
|
| 7 | +======================================== ENDCONFIG ]]-- |
| 8 | + |
| 9 | +emu.wait(50) -- IIc emulation is very slow |
| 10 | + |
| 11 | +test.Step( |
| 12 | + "No prompt if no change", |
| 13 | + function() |
| 14 | + local drive = apple2.Get35Drive1() |
| 15 | + a2d.OpenPath("/A2.DESKTOP/APPLE.MENU/CONTROL.PANELS/OPTIONS") |
| 16 | + |
| 17 | + local current = drive.filename |
| 18 | + drive:unload() |
| 19 | + |
| 20 | + a2d.CloseWindow() |
| 21 | + a2d.WaitForRepaint() |
| 22 | + test.Snap("verify no prompt to save") |
| 23 | + |
| 24 | + drive:load(current) |
| 25 | + a2d.CloseAllWindows() |
| 26 | +end) |
| 27 | + |
| 28 | +test.Step( |
| 29 | + "Prompt if changed", |
| 30 | + function() |
| 31 | + local drive = apple2.Get35Drive1() |
| 32 | + a2d.OpenPath("/A2.DESKTOP/APPLE.MENU/CONTROL.PANELS/OPTIONS") |
| 33 | + a2d.OAShortcut("5") -- show invisible files |
| 34 | + |
| 35 | + local current = drive.filename |
| 36 | + drive:unload() |
| 37 | + |
| 38 | + a2d.CloseWindow() |
| 39 | + a2d.WaitForRepaint() |
| 40 | + test.Snap("verify prompt to save") |
| 41 | + a2d.DialogCancel() |
| 42 | + |
| 43 | + drive:load(current) |
| 44 | + a2d.CloseAllWindows() |
| 45 | +end) |
| 46 | + |
| 47 | +test.Step( |
| 48 | + "Repaints when obscured", |
| 49 | + function() |
| 50 | + a2d.OpenPath("/A2.DESKTOP/APPLE.MENU/CONTROL.PANELS/OPTIONS") |
| 51 | + a2d.InMouseKeysMode(function(m) |
| 52 | + m.MoveToApproximately(280, 45) |
| 53 | + m.ButtonDown() |
| 54 | + m.MoveToApproximately(280,192) |
| 55 | + m.ButtonUp() |
| 56 | + end) |
| 57 | + a2d.WaitForRepaint() |
| 58 | + a2d.OAShortcut("1") |
| 59 | + a2d.OAShortcut("2") |
| 60 | + a2d.OAShortcut("3") |
| 61 | + test.Snap("verify no mispaints") |
| 62 | + a2d.CloseWindow() |
| 63 | + a2d.CloseAllWindows() |
| 64 | +end) |
| 65 | + |
| 66 | +test.Step( |
| 67 | + "No crash after running", |
| 68 | + function() |
| 69 | + a2d.OpenPath("/A2.DESKTOP/APPLE.MENU/CONTROL.PANELS/OPTIONS") |
| 70 | + a2d.CloseWindow() |
| 71 | + a2d.InvokeMenuItem(a2d.APPLE_MENU, a2d.RUN_BASIC_HERE) |
| 72 | + a2d.WaitForRestart() |
| 73 | + test.Snap("verify no crash to monitor") |
| 74 | +end) |
0 commit comments