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

Function TestOptNegotiation

tscreen_test.go:273–290  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

271}
272
273func TestOptNegotiation(t *testing.T) {
274 mt := vt.NewMockTerm(vt.MockOptSize{X: 8, Y: 2})
275 scr, err := NewTerminfoScreenFromTty(mt, OptNegotiation(false))
276 if err != nil {
277 t.Fatalf("failed to get screen: %v", err)
278 }
279 bs, ok := scr.(*baseScreen)
280 if !ok {
281 t.Fatalf("expected *baseScreen, got %T", scr)
282 }
283 ts, ok := bs.screenImpl.(*tScreen)
284 if !ok {
285 t.Fatalf("expected *tScreen, got %T", bs.screenImpl)
286 }
287 if ts.negotiate {
288 t.Fatal("negotiation option was not applied")
289 }
290}
291
292func TestSetSizeTakesScreenLock(t *testing.T) {
293 mt := vt.NewMockTerm(vt.MockOptSize{X: 8, Y: 2})

Callers

nothing calls this directly

Calls 3

NewMockTermFunction · 0.92
NewTerminfoScreenFromTtyFunction · 0.85
OptNegotiationTypeAlias · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…