diff --git a/widgets/text/text_test.go b/widgets/text/text_test.go index 3cee5f9..0f953f9 100644 --- a/widgets/text/text_test.go +++ b/widgets/text/text_test.go @@ -54,6 +54,17 @@ func TestTextDraws(t *testing.T) { }, wantErr: true, }, + { + desc: "fails when MaxTextCells is negative", + opts: []Option{ + MaxTextCells(-1), + }, + canvas: image.Rect(0, 0, 1, 1), + want: func(size image.Point) *faketerm.Terminal { + return faketerm.MustNew(size) + }, + wantErr: true, + }, { desc: "fails when scroll mouse buttons aren't unique", opts: []Option{