(t *testing.T)
| 26 | } |
| 27 | |
| 28 | func TestNewLine(t *testing.T) { |
| 29 | b := makeBufferForTesting(30, 3) |
| 30 | writeRaw(b, []rune("hello")...) |
| 31 | b.carriageReturn() |
| 32 | b.newLine() |
| 33 | writeRaw(b, []rune("goodbye")...) |
| 34 | b.carriageReturn() |
| 35 | b.newLine() |
| 36 | expected := ` |
| 37 | hello |
| 38 | goodbye |
| 39 | ` |
| 40 | |
| 41 | lines := b.GetVisibleLines() |
| 42 | strs := []string{} |
| 43 | for _, l := range lines { |
| 44 | strs = append(strs, l.String()) |
| 45 | } |
| 46 | require.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(strings.Join(strs, "\n"))) |
| 47 | } |
| 48 | |
| 49 | func TestTabbing(t *testing.T) { |
| 50 | b := makeBufferForTesting(30, 3) |
nothing calls this directly
no test coverage detected