MCPcopy Create free account
hub / github.com/box-cli-maker/box-cli-maker / TestBuildSegment

Function TestBuildSegment

util_test.go:365–378  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

363}
364
365func TestBuildSegment(t *testing.T) {
366 fill := "📦"
367 hw := runewidth.StringWidth(fill)
368
369 seg := buildSegment(fill, hw*3, hw)
370 if runewidth.StringWidth(seg) != hw*3 {
371 t.Fatalf("expected segment visual width %d, got %d", hw*3, runewidth.StringWidth(seg))
372 }
373
374 seg = buildSegment(fill, hw*3+1, hw)
375 if runewidth.StringWidth(seg) != hw*3+1 {
376 t.Fatalf("expected segment visual width %d, got %d", hw*3+1, runewidth.StringWidth(seg))
377 }
378}
379
380func TestBuildPlainBar(t *testing.T) {
381 fill := "📦"

Callers

nothing calls this directly

Calls 1

buildSegmentFunction · 0.85

Tested by

no test coverage detected