MCPcopy
hub / github.com/mum4k/termdash / TestDrawResizeMarker

Function TestDrawResizeMarker

widgets/checkbox/checkbox_test.go:65–80  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

63}
64
65func TestDrawResizeMarker(t *testing.T) {
66 cb, err := New("Cloak")
67 if err != nil {
68 t.Fatalf("New => unexpected error: %v", err)
69 }
70
71 ft := faketerm.MustNew(image.Point{X: 2, Y: 1})
72 cvs := testcanvas.MustNew(ft.Area())
73 if err := cb.Draw(cvs, &widgetapi.Meta{Focused: true}); err != nil {
74 t.Fatalf("Draw => unexpected error: %v", err)
75 }
76 testcanvas.MustApply(cvs, ft)
77 if got := string([]rune(strings.Split(ft.String(), "\n")[0])[:1]); got != "⇄" {
78 t.Fatalf("resize marker = %q, want %q", got, "⇄")
79 }
80}
81
82func TestKeyboardAndMouse(t *testing.T) {
83 var got []bool

Callers

nothing calls this directly

Calls 7

MustNewFunction · 0.92
MustNewFunction · 0.92
MustApplyFunction · 0.92
NewFunction · 0.70
DrawMethod · 0.65
AreaMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected