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

Function TestClearWithFullView

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

Source from the content-addressed store, hash-verified

309}
310
311func TestClearWithFullView(t *testing.T) {
312 b := makeBufferForTesting(80, 5)
313 writeRaw(b, []rune("hello 1")...)
314 b.carriageReturn()
315 b.newLine()
316 writeRaw(b, []rune("hello 1")...)
317 b.carriageReturn()
318 b.newLine()
319 writeRaw(b, []rune("hello 1")...)
320 b.carriageReturn()
321 b.newLine()
322 writeRaw(b, []rune("hello 1")...)
323 b.carriageReturn()
324 b.newLine()
325 writeRaw(b, []rune("hello 1")...)
326 b.carriageReturn()
327 b.newLine()
328 writeRaw(b, []rune("hello 1")...)
329 b.carriageReturn()
330 b.newLine()
331 writeRaw(b, []rune("hello 1")...)
332 b.carriageReturn()
333 b.newLine()
334 writeRaw(b, []rune("hello 1")...)
335 b.clear()
336 lines := b.GetVisibleLines()
337 for _, line := range lines {
338 assert.Equal(t, "", line.String())
339 }
340}
341
342func TestCarriageReturn(t *testing.T) {
343 b := makeBufferForTesting(80, 20)

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