summaryrefslogtreecommitdiff
path: root/lldb/test/functionalities/command_script
diff options
context:
space:
mode:
authorDaniel Malea <daniel.malea@intel.com>2013-02-21 21:18:07 +0000
committerDaniel Malea <daniel.malea@intel.com>2013-02-21 21:18:07 +0000
commitd82ac9e76913b0c02b3f736b1caa680f38a421fd (patch)
tree028a2377a38ed2815d2c6b408137deee7f5fba3a /lldb/test/functionalities/command_script
parentb29cf48e567bdd6c6ec54f096de7ff263c470142 (diff)
Fix CommandObjectMultiword to initialize all members, and beef up corresponding test case.
llvm-svn: 175798
Diffstat (limited to 'lldb/test/functionalities/command_script')
-rw-r--r--lldb/test/functionalities/command_script/TestCommandScript.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/lldb/test/functionalities/command_script/TestCommandScript.py b/lldb/test/functionalities/command_script/TestCommandScript.py
index 808f46b8046b..bbc9e783565c 100644
--- a/lldb/test/functionalities/command_script/TestCommandScript.py
+++ b/lldb/test/functionalities/command_script/TestCommandScript.py
@@ -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'])