diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2025-02-04 08:55:30 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-04 08:55:30 -0800 |
| commit | 906eeeda833b30fb7fdc3b7586de34b65d575b45 (patch) | |
| tree | b21aeab735177868ab292b3010c0acdc4570d7df /lldb/test/API/python_api | |
| parent | 84fbed86ffcb97c24f9294a204c60da5444b8646 (diff) | |
| download | llvm-906eeeda833b30fb7fdc3b7586de34b65d575b45.zip llvm-906eeeda833b30fb7fdc3b7586de34b65d575b45.tar.gz llvm-906eeeda833b30fb7fdc3b7586de34b65d575b45.tar.bz2 | |
[lldb] Store the command in the CommandReturnObject (#125132)
As suggested in #125006. Depending on which PR lands first, I'll update
`TestCommandInterepterPrintCallback.py` to check that the
`CommandReturnObject` passed to the callback has the correct command.
Diffstat (limited to 'lldb/test/API/python_api')
| -rw-r--r-- | lldb/test/API/python_api/commandreturnobject/TestSBCommandReturnObject.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lldb/test/API/python_api/commandreturnobject/TestSBCommandReturnObject.py b/lldb/test/API/python_api/commandreturnobject/TestSBCommandReturnObject.py new file mode 100644 index 0000000..b0d0b7a --- /dev/null +++ b/lldb/test/API/python_api/commandreturnobject/TestSBCommandReturnObject.py @@ -0,0 +1,17 @@ +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + + +class SBCommandReturnObjectTest(TestBase): + NO_DEBUG_INFO_TESTCASE = True + + def test(self): + res = lldb.SBCommandReturnObject() + self.assertEqual(res.GetCommand(), "") + + ci = self.dbg.GetCommandInterpreter() + ci.HandleCommand("help help", res) + self.assertTrue(res.Succeeded()) + self.assertEqual(res.GetCommand(), "help help") |
