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

Function TestRenderInvalidContentAlign

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

Source from the content-addressed store, hash-verified

354}
355
356func TestRenderInvalidContentAlign(t *testing.T) {
357 b := NewBox().Padding(1, 1).Style(Single).ContentAlign(AlignType("Weird"))
358
359 if _, err := b.Render("Title", "Content"); err == nil {
360 t.Fatalf("expected error for invalid content alignment, got nil")
361 } else if !strings.Contains(err.Error(), "invalid Content Alignment") {
362 t.Errorf("unexpected error message for invalid content alignment: %v", err)
363 }
364}
365
366func TestRenderWithWrapLimit(t *testing.T) {
367 longContent := strings.Repeat("word ", 20)

Callers

nothing calls this directly

Calls 6

NewBoxFunction · 0.85
AlignTypeTypeAlias · 0.85
ContentAlignMethod · 0.80
StyleMethod · 0.80
PaddingMethod · 0.80
RenderMethod · 0.80

Tested by

no test coverage detected