(t *testing.T)
| 363 | } |
| 364 | |
| 365 | func 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 | |
| 380 | func TestBuildPlainBar(t *testing.T) { |
| 381 | fill := "📦" |
nothing calls this directly
no test coverage detected