(t *testing.T)
| 76 | } |
| 77 | |
| 78 | func TestOffsets(t *testing.T) { |
| 79 | b := makeBufferForTesting(10, 3) |
| 80 | writeRaw(b, []rune("hello")...) |
| 81 | b.carriageReturn() |
| 82 | b.newLine() |
| 83 | writeRaw(b, []rune("hello")...) |
| 84 | b.carriageReturn() |
| 85 | b.newLine() |
| 86 | writeRaw(b, []rune("hello")...) |
| 87 | b.carriageReturn() |
| 88 | b.newLine() |
| 89 | writeRaw(b, []rune("hello")...) |
| 90 | b.carriageReturn() |
| 91 | b.newLine() |
| 92 | writeRaw(b, []rune("hello")...) |
| 93 | assert.Equal(t, uint16(10), b.ViewWidth()) |
| 94 | assert.Equal(t, uint16(10), b.Width()) |
| 95 | assert.Equal(t, uint16(3), b.ViewHeight()) |
| 96 | assert.Equal(t, 5, b.Height()) |
| 97 | } |
| 98 | |
| 99 | func TestBufferWriteIncrementsCursorCorrectly(t *testing.T) { |
| 100 | b := makeBufferForTesting(5, 4) |
nothing calls this directly
no test coverage detected