25 lines · python
1import lldb2from lldbsuite.test.decorators import *3from lldbsuite.test.lldbtest import *4from lldbsuite.test import lldbutil5 6 7class TestCase(TestBase):8 @no_debug_info_test9 @skipIf(10 hostoslist=["windows"],11 bugnumber="https://github.com/llvm/llvm-project/issues/120021",12 )13 def test_resize_no_editline(self):14 """Tests terminal resizing if the editline isn't used."""15 dbg = lldb.SBDebugger.Create(False)16 # Set the input handle to some stream so that we don't start the17 # editline interface.18 dbg.SetInputFileHandle(open("input_file"), True)19 opts = lldb.SBCommandInterpreterRunOptions()20 # Launch the command interpreter now.21 dbg.RunCommandInterpreter(True, True, opts, 0, False, False)22 # Try resizing the terminal which shouldn't crash.23 dbg.SetTerminalWidth(47)24 dbg.GetInputFile().Close()25