Skip to content

Commit 6a12b92

Browse files
committed
[lldb] Add a test for terminal dimensions
Add a test for the term-width and term-height settings.
1 parent ced23aa commit 6a12b92

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import lldb
2+
from lldbsuite.test.decorators import *
3+
from lldbsuite.test.lldbtest import *
4+
from lldbsuite.test import lldbutil
5+
from lldbsuite.test.lldbpexpect import PExpectTest
6+
7+
8+
class TerminalDimensionsTest(PExpectTest):
9+
NO_DEBUG_INFO_TESTCASE = True
10+
11+
@skipIfAsan
12+
def test(self):
13+
"""Test that the lldb driver correctly reports the (PExpect) terminal dimension."""
14+
self.launch(dimensions=(40, 40), timeout=1)
15+
16+
# Tests clear all the settings so we lose the launch values. Resize the
17+
# window to update the settings. These new values need to be different
18+
# to trigger a SIGWINCH.
19+
self.child.setwinsize(20, 60)
20+
21+
self.expect("settings show term-height", ["term-height (unsigned) = 20"])
22+
self.expect("settings show term-width", ["term-width (unsigned) = 60"])

0 commit comments

Comments
 (0)