diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2025-02-04 10:26:52 -0800 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2025-02-04 10:42:08 -0800 |
| commit | 53d6e59b594639417cdbfcfa2d18cea64acb4009 (patch) | |
| tree | 74d58b10f335fd05efbd564a2db0d4430d303675 /lldb/test/API/python_api/interpreter_callback | |
| parent | 560e372555545542353a4b3a3d6bae82af2382f2 (diff) | |
[lldb] Check the command string in TestCommandInterepterPrintCallback
Now that we store the command in the CommandReturnObject (#125132) we
can check the command in the print callback.
Diffstat (limited to 'lldb/test/API/python_api/interpreter_callback')
| -rw-r--r-- | lldb/test/API/python_api/interpreter_callback/TestCommandInterepterPrintCallback.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lldb/test/API/python_api/interpreter_callback/TestCommandInterepterPrintCallback.py b/lldb/test/API/python_api/interpreter_callback/TestCommandInterepterPrintCallback.py index d11fd88aa804..c99c636bda3d 100644 --- a/lldb/test/API/python_api/interpreter_callback/TestCommandInterepterPrintCallback.py +++ b/lldb/test/API/python_api/interpreter_callback/TestCommandInterepterPrintCallback.py @@ -38,6 +38,7 @@ class CommandInterepterPrintCallbackTest(TestBase): def handling_callback(return_object): nonlocal called called = True + self.assertEqual("help help", return_object.GetCommand()) self.assertIn(needle, return_object.GetOutput()) return lldb.eCommandReturnObjectPrintCallbackHandled @@ -53,13 +54,14 @@ class CommandInterepterPrintCallbackTest(TestBase): def non_handling_callback(return_object): nonlocal called called = True + self.assertEqual("he help", return_object.GetCommand()) self.assertIn(needle, return_object.GetOutput()) return lldb.eCommandReturnObjectPrintCallbackSkipped called = False ci.SetPrintCallback(non_handling_callback) self.assertFalse(called) - self.run_command_interpreter_with_output_file(out_filename, "help help\n") + self.run_command_interpreter_with_output_file(out_filename, "he help\n") self.assertTrue(called) with open(out_filename, "r") as f: |
