MCPcopy Index your code
hub / github.com/box-cli-maker/box-cli-maker / TestRenderNegativeWrapLimit

Function TestRenderNegativeWrapLimit

box_render_test.go:314–322  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

312}
313
314func TestRenderNegativeWrapLimit(t *testing.T) {
315 b := NewBox().Padding(1, 1).Style(Single).WrapContent(true).WrapLimit(-1)
316
317 if _, err := b.Render("Title", "Content"); err == nil {
318 t.Fatalf("expected error for negative wrap limit, got nil")
319 } else if !strings.Contains(err.Error(), "wrapping limit cannot be negative") {
320 t.Errorf("unexpected error message for negative wrap limit: %v", err)
321 }
322}
323
324func TestRenderNonTTYLWrapContent(t *testing.T) {
325 oldIsTTY := isTTY

Callers

nothing calls this directly

Calls 6

NewBoxFunction · 0.85
WrapLimitMethod · 0.80
WrapContentMethod · 0.80
StyleMethod · 0.80
PaddingMethod · 0.80
RenderMethod · 0.80

Tested by

no test coverage detected