Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions lldb/test/API/driver/terminal/TestTerminalDimensions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
from lldbsuite.test.lldbpexpect import PExpectTest


class TerminalDimensionsTest(PExpectTest):
NO_DEBUG_INFO_TESTCASE = True

@skipIfAsan
def test(self):
"""Test that the lldb driver correctly reports the (PExpect) terminal dimension."""
self.launch(dimensions=(40, 40), timeout=1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do the dimensions matter if they'll get cleared and then reset later in the test?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They matter in the sense that they need to be different (noted in the comment below). I. need to remove the , timeout=1 because that was just for local debugging.


# Tests clear all the settings so we lose the launch values. Resize the
# window to update the settings. These new values need to be different
# to trigger a SIGWINCH.
self.child.setwinsize(20, 60)

self.expect("settings show term-height", ["term-height (unsigned) = 20"])
self.expect("settings show term-width", ["term-width (unsigned) = 60"])