diff --git a/src/py65/monitor.py b/src/py65/monitor.py index 40c66bb..89451c7 100644 --- a/src/py65/monitor.py +++ b/src/py65/monitor.py @@ -627,7 +627,7 @@ class Monitor(cmd.Cmd): split = shlex.split(args) if len(split) != 2: self._output("Syntax error: %s" % args) - return + return self.help_add_label() address = self._address_parser.number(split[0]) label = split[1] diff --git a/src/py65/tests/test_monitor.py b/src/py65/tests/test_monitor.py index d75cb69..a93f9d6 100644 --- a/src/py65/tests/test_monitor.py +++ b/src/py65/tests/test_monitor.py @@ -55,7 +55,8 @@ class MonitorTests(unittest.TestCase): mon = Monitor(stdout=stdout) mon.do_add_label('should be label space value') out = stdout.getvalue() - self.assertEqual("Syntax error: should be label space value\n", out) + err = "Syntax error: should be label space value\n" + self.assertTrue(out.startswith(err)) def test_do_add_label_adds_label(self): stdout = StringIO()