MCPcopy
hub / github.com/liamg/darktile / TestClearWithoutFullView

Function TestClearWithoutFullView

internal/app/darktile/termutil/buffer_test.go:295–309  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

293}
294
295func TestClearWithoutFullView(t *testing.T) {
296 b := makeBufferForTesting(80, 10)
297 writeRaw(b, []rune("hello 1")...)
298 b.carriageReturn()
299 b.newLine()
300 writeRaw(b, []rune("hello 1")...)
301 b.carriageReturn()
302 b.newLine()
303 writeRaw(b, []rune("hello 1")...)
304 b.clear()
305 lines := b.GetVisibleLines()
306 for _, line := range lines {
307 assert.Equal(t, "", line.String())
308 }
309}
310
311func TestClearWithFullView(t *testing.T) {
312 b := makeBufferForTesting(80, 5)

Callers

nothing calls this directly

Calls 7

makeBufferForTestingFunction · 0.85
writeRawFunction · 0.85
carriageReturnMethod · 0.80
newLineMethod · 0.80
clearMethod · 0.80
GetVisibleLinesMethod · 0.80
StringMethod · 0.80

Tested by

no test coverage detected