(t *testing.T)
| 491 | } |
| 492 | } |
| 493 | func TestEraseDisplayToCursor(t *testing.T) { |
| 494 | b := makeBufferForTesting(80, 5) |
| 495 | writeRaw(b, []rune("hello")...) |
| 496 | b.carriageReturn() |
| 497 | b.newLine() |
| 498 | writeRaw(b, []rune("asdasd")...) |
| 499 | b.carriageReturn() |
| 500 | b.newLine() |
| 501 | writeRaw(b, []rune("thing")...) |
| 502 | b.movePosition(-2, 0) |
| 503 | b.eraseDisplayToCursor() |
| 504 | lines := b.GetVisibleLines() |
| 505 | assert.Equal(t, "", lines[0].String()) |
| 506 | assert.Equal(t, "", lines[1].String()) |
| 507 | assert.Equal(t, "\x00\x00\x00\x00g", lines[2].String()) |
| 508 | |
| 509 | } |
| 510 | |
| 511 | func TestEraseDisplayFromCursor(t *testing.T) { |
| 512 | b := makeBufferForTesting(80, 5) |
nothing calls this directly
no test coverage detected