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