mirror of
https://github.com/mnaberez/py65.git
synced 2025-01-04 01:30:18 +00:00
Show help for fill when no arguments are given
This commit is contained in:
parent
2da902cf7b
commit
496ace9db0
@ -566,8 +566,7 @@ class Monitor(cmd.Cmd):
|
||||
def do_fill(self, args):
|
||||
split = shlex.split(args)
|
||||
if len(split) < 2:
|
||||
self._output("Syntax error: %s" % args)
|
||||
return
|
||||
return self.help_fill()
|
||||
|
||||
start, end = self._address_parser.range(split[0])
|
||||
filler = map(self._address_parser.number, split[1:])
|
||||
|
@ -291,7 +291,7 @@ class MonitorTests(unittest.TestCase):
|
||||
mon.do_help('f')
|
||||
|
||||
out = stdout.getvalue()
|
||||
self.assertTrue(out.startswith('fill'))
|
||||
self.assertTrue(out.startswith('fill <address_range>'))
|
||||
|
||||
def test_shortcut_gt_for_fill(self):
|
||||
stdout = StringIO()
|
||||
@ -299,7 +299,24 @@ class MonitorTests(unittest.TestCase):
|
||||
mon.do_help('>')
|
||||
|
||||
out = stdout.getvalue()
|
||||
self.assertTrue(out.startswith('fill'))
|
||||
self.assertTrue(out.startswith('fill <address_range>'))
|
||||
|
||||
def test_help_fill(self):
|
||||
stdout = StringIO()
|
||||
mon = Monitor(stdout=stdout)
|
||||
mon.help_fill()
|
||||
|
||||
out = stdout.getvalue()
|
||||
self.assertTrue(out.startswith('fill <address_range>'))
|
||||
|
||||
def test_do_fill_with_no_args_shows_help(self):
|
||||
stdout = StringIO()
|
||||
mon = Monitor(stdout=stdout)
|
||||
mon.do_fill('')
|
||||
|
||||
out = stdout.getvalue()
|
||||
self.assertTrue(out.startswith('fill <address_range>'))
|
||||
|
||||
|
||||
# goto
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user