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