(t *testing.T)
| 378 | } |
| 379 | |
| 380 | func TestBuildPlainBar(t *testing.T) { |
| 381 | fill := "📦" |
| 382 | hw := runewidth.StringWidth(fill) |
| 383 | lineWidth := hw*10 + 2 // 10 emojis + 2 corners |
| 384 | |
| 385 | left := fill |
| 386 | right := fill |
| 387 | bar := buildPlainBar(left, fill, right, hw, hw, lineWidth, hw) |
| 388 | if w := runewidth.StringWidth(bar); w != lineWidth { |
| 389 | t.Fatalf("expected bar visual width %d, got %d", lineWidth, w) |
| 390 | } |
| 391 | if !strings.HasPrefix(bar, fill) || !strings.HasSuffix(bar, fill) { |
| 392 | t.Errorf("expected bar to start and end with fill, got %q", bar) |
| 393 | } |
| 394 | } |
| 395 | |
| 396 | func TestBuildTitledBar_LeftAlignedWithEmojiFill(t *testing.T) { |
| 397 | fill := "📦" |
nothing calls this directly
no test coverage detected