(t *testing.T)
| 10 | ) |
| 11 | |
| 12 | func TestAddVertPadding(t *testing.T) { |
| 13 | b := &Box{vertical: "|"} |
| 14 | b.py = 2 |
| 15 | |
| 16 | // innerWidth is the visible width between the vertical borders. |
| 17 | got, err := b.addVertPadding(4) |
| 18 | if err != nil { |
| 19 | t.Fatalf("addVertPadding unexpected error: %v", err) |
| 20 | } |
| 21 | if len(got) != 2 { |
| 22 | t.Fatalf("expected 2 padding lines, got %d", len(got)) |
| 23 | } |
| 24 | |
| 25 | want := "| |" // len-2 = 4 spaces |
| 26 | for i, line := range got { |
| 27 | if line != want { |
| 28 | t.Errorf("line %d: expected %q, got %q", i, want, line) |
| 29 | } |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | func TestLongestLineBasicAndTabs(t *testing.T) { |
| 34 | lines := []string{"short", "longer"} |
nothing calls this directly
no test coverage detected