Fix CommandObjectMultiword to initialize all members, and beef up corresponding test case.

llvm-svn: 175798
This commit is contained in:
Daniel Malea
2013-02-21 21:18:07 +00:00
parent b29cf48e56
commit d82ac9e769
2 changed files with 13 additions and 1 deletions

View File

@@ -111,9 +111,20 @@ class CmdPythonTestCase(TestBase):
self.expect("tell_curr",
substrs = ['I am running sync'])
# Test that a python command can redefine itself
self.expect('command script add -f foobar welcome')
self.runCmd("command script clear")
# Test that re-defining an existing command works
self.runCmd('command script add my_command --function welcome.welcome_impl')
self.expect('my_command Blah', substrs = ['Hello Blah, welcome to LLDB'])
self.runCmd('command script add my_command --function welcome.target_name_impl')
self.expect('my_command', substrs = ['a.out'])
self.runCmd("command script clear")
self.expect('command script list', matching=False,
substrs = ['targetname',
'longwait'])