diff options
Diffstat (limited to 'lldb/test/API/commands/command/script/TestCommandScript.py')
-rw-r--r-- | lldb/test/API/commands/command/script/TestCommandScript.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lldb/test/API/commands/command/script/TestCommandScript.py b/lldb/test/API/commands/command/script/TestCommandScript.py index 33e6a00a404f..eed36c95ec32 100644 --- a/lldb/test/API/commands/command/script/TestCommandScript.py +++ b/lldb/test/API/commands/command/script/TestCommandScript.py @@ -167,7 +167,17 @@ class CmdPythonTestCase(TestBase): self.runCmd('bug11569', check=False) def test_persistence(self): + """ + Ensure that function arguments meaningfully persist (and do not crash!) + even after the function terminates. + """ self.runCmd("command script import persistence.py") self.runCmd("command script add -f persistence.save_debugger save_debugger") self.expect("save_debugger", substrs=[str(self.dbg)]) + + # After the command completes, the debugger object should still be + # valid. self.expect("script str(persistence.debugger_copy)", substrs=[str(self.dbg)]) + # The result object will be replaced by an empty result object (in the + # "Started" state). + self.expect("script str(persistence.result_copy)", substrs=["Started"]) |