(t *testing.T)
| 348 | } |
| 349 | |
| 350 | func TestCharWidth(t *testing.T) { |
| 351 | if w := charWidth("abc"); w != 3 { |
| 352 | t.Errorf("expected width 3 for 'abc', got %d", w) |
| 353 | } |
| 354 | |
| 355 | colored := "\x1b[31mabc\x1b[0m" // red "abc" |
| 356 | if w := charWidth(colored); w != 3 { |
| 357 | t.Errorf("expected visible width 3 for colored 'abc', got %d", w) |
| 358 | } |
| 359 | |
| 360 | if w := charWidth(""); w != 1 { |
| 361 | t.Errorf("expected fallback width 1 for empty string, got %d", w) |
| 362 | } |
| 363 | } |
| 364 | |
| 365 | func TestBuildSegment(t *testing.T) { |
| 366 | fill := "📦" |
nothing calls this directly
no test coverage detected