From 56cee6fbbd31bd3b17a6a46c357f8d94bfca5dc7 Mon Sep 17 00:00:00 2001 From: Mike Naberezny Date: Sat, 13 Dec 2014 19:37:02 -0800 Subject: [PATCH] Add test for stopping at breakpoint --- py65/tests/test_monitor.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/py65/tests/test_monitor.py b/py65/tests/test_monitor.py index fed5ebe..b927e2a 100644 --- a/py65/tests/test_monitor.py +++ b/py65/tests/test_monitor.py @@ -458,6 +458,16 @@ class MonitorTests(unittest.TestCase): out = stdout.getvalue() self.assertTrue("goto
" in out) + def test_goto_stops_execution_at_breakpoint(self): + stdout = StringIO() + mon = Monitor(stdout=stdout) + mon._address_parser.breakpoints = [ 0x02 ] + mon._mpu.memory = [ 0xEA, 0xEA, 0xEA, 0xEA ] + mon.do_goto('0') + out = stdout.getvalue() + self.assertTrue(out.startswith("Breakpoint 0 reached")) + self.assertEqual(0x02, mon._mpu.pc) + # help def test_help_without_args_shows_documented_commands(self):