1import lldb
2from lldbsuite.test.decorators import *
3from lldbsuite.test.lldbtest import *
4from lldbsuite.test import lldbutil
5
6class TestCase(TestBase):
7
8    mydir = TestBase.compute_mydir(__file__)
9
10    @no_debug_info_test
11    @skipIfWindows
12    def test_resize_no_editline(self):
13        """ Tests terminal resizing if the editline isn't used. """
14        dbg = lldb.SBDebugger.Create(False)
15        # Set the input handle to some stream so that we don't start the
16        # editline interface.
17        dbg.SetInputFileHandle(open("input_file"), True)
18        opts = lldb.SBCommandInterpreterRunOptions()
19        # Launch the command interpreter now.
20        dbg.RunCommandInterpreter(True, True, opts, 0, False, False)
21        # Try resizing the terminal which shouldn't crash.
22        dbg.SetTerminalWidth(47)
23