diff options
author | Enrico Granata <egranata@apple.com> | 2014-10-01 21:47:29 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2014-10-01 21:47:29 +0000 |
commit | 06be059ad9950c7f33a63ecabfb3562f34dd3d51 (patch) | |
tree | 6c32e91937ab5375eaaa8c3a0503d42d929e5792 /lldb/test/functionalities/command_script/TestCommandScript.py | |
parent | ebcf42cdec7a51b8fe6b07cf01ce0f7bd0e8be86 (diff) | |
download | bcm5719-llvm-06be059ad9950c7f33a63ecabfb3562f34dd3d51.tar.gz bcm5719-llvm-06be059ad9950c7f33a63ecabfb3562f34dd3d51.zip |
Allow Python commands to optionally take an SBExecutionContext argument in case they need to handle 'where they want to act' separately from the notion of 'currently-selected entity' that is associated to the debugger. Do this in an (hopefully) non-breaking way by running an argcount check before passing in the new argument. Update the test case to also check for this new feature. www update to follow
llvm-svn: 218834
Diffstat (limited to 'lldb/test/functionalities/command_script/TestCommandScript.py')
-rw-r--r-- | lldb/test/functionalities/command_script/TestCommandScript.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lldb/test/functionalities/command_script/TestCommandScript.py b/lldb/test/functionalities/command_script/TestCommandScript.py index 6efda1c46aa..27ce4a7c6f1 100644 --- a/lldb/test/functionalities/command_script/TestCommandScript.py +++ b/lldb/test/functionalities/command_script/TestCommandScript.py @@ -40,6 +40,7 @@ class CmdPythonTestCase(TestBase): self.runCmd('command script delete tell_async', check=False) self.runCmd('command script delete tell_curr', check=False) self.runCmd('command script delete bug11569', check=False) + self.runCmd('command script delete takes_exe_ctx', check=False) # Execute the cleanup function during test case tear down. self.addTearDownHook(cleanup) @@ -108,6 +109,9 @@ class CmdPythonTestCase(TestBase): substrs = ['running async']) self.expect("tell_curr", substrs = ['I am running sync']) + +# check that the execution context is passed in to commands that ask for it + self.expect("takes_exe_ctx", substrs = ["a.out"]) # Test that a python command can redefine itself self.expect('command script add -f foobar welcome -h "just some help"') |