From c333cdf1dd3e328de9207ddd677255356f49d133 Mon Sep 17 00:00:00 2001 From: Mike Naberezny Date: Tue, 18 Mar 2014 20:42:40 -0700 Subject: [PATCH] Add test for memory display wrap --- 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 b52cc21..521073d 100644 --- a/py65/tests/test_monitor.py +++ b/py65/tests/test_monitor.py @@ -550,6 +550,16 @@ class MonitorTests(unittest.TestCase): out = stdout.getvalue() self.assertEqual('c000: aa bb cc\n', out) + def test_do_mem_wraps_at_terminal_width(self): + stdout = StringIO() + mon = Monitor(stdout=stdout) + mon._width = 14 + mon.do_mem('c000:c003') + + out = stdout.getvalue() + self.assertEqual('c000: 00 00\n' + 'c002: 00 00\n', out) + # mpu def test_mpu_with_no_args_prints_current_lists_available_mpus(self):