MCPcopy
hub / github.com/gdamore/tcell / TestDECSTBMv4

Function TestDECSTBMv4

vt/tests/emulate_test.go:131–161  ·  view source on GitHub ↗

TestDECSTBMv4 top == bottom

(t *testing.T)

Source from the content-addressed store, hash-verified

129
130// TestDECSTBMv4 top == bottom
131func TestDECSTBMv4(t *testing.T) {
132 term := vt.NewMockTerm(vt.MockOptSize{X: 8, Y: 4})
133 defer MustClose(t, term)
134 MustStart(t, term)
135
136 WriteF(t, term, "\033[1;1H")
137 WriteF(t, term, "\033[0J")
138 WriteF(t, term, "ABC\r\n")
139 WriteF(t, term, "DEF\r\n")
140 WriteF(t, term, "GHI\r\n")
141 WriteF(t, term, "\033[2;2r")
142 WriteF(t, term, "\033[T")
143
144 // |________|
145 // |ABC_____|
146 // |DEF_____|
147 // |GHI_____|
148 CheckPos(t, term, 0, 3)
149 CheckContent(t, term, 0, 0, "")
150 CheckContent(t, term, 1, 0, "")
151 CheckContent(t, term, 2, 0, "")
152 CheckContent(t, term, 0, 1, "A")
153 CheckContent(t, term, 1, 1, "B")
154 CheckContent(t, term, 2, 1, "C")
155 CheckContent(t, term, 0, 2, "D")
156 CheckContent(t, term, 1, 2, "E")
157 CheckContent(t, term, 2, 2, "F")
158 CheckContent(t, term, 0, 3, "G")
159 CheckContent(t, term, 1, 3, "H")
160 CheckContent(t, term, 2, 3, "I")
161}
162
163// TestDECSLRMv1 tests full screen right and left margins.
164func TestDECSLRMv1(t *testing.T) {

Callers

nothing calls this directly

Calls 6

NewMockTermFunction · 0.92
MustCloseFunction · 0.85
MustStartFunction · 0.85
WriteFFunction · 0.85
CheckPosFunction · 0.85
CheckContentFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…