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

Function TestRenderMultilineTitleNonInside

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

Source from the content-addressed store, hash-verified

301}
302
303func TestRenderMultilineTitleNonInside(t *testing.T) {
304 b := NewBox().Padding(2, 1).Style(Single).TitlePosition(Top)
305 _, err := b.Render("Line1\nLine2", "Content")
306 if err == nil {
307 t.Fatalf("expected error for multiline title at non-Inside position, got nil")
308 }
309 if !strings.Contains(err.Error(), "multiline titles are only supported Inside title position only") {
310 t.Errorf("unexpected error message: %v", err)
311 }
312}
313
314func TestRenderNegativeWrapLimit(t *testing.T) {
315 b := NewBox().Padding(1, 1).Style(Single).WrapContent(true).WrapLimit(-1)

Callers

nothing calls this directly

Calls 5

NewBoxFunction · 0.85
TitlePositionMethod · 0.80
StyleMethod · 0.80
PaddingMethod · 0.80
RenderMethod · 0.80

Tested by

no test coverage detected