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

Function TestGetCell

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

Source from the content-addressed store, hash-verified

387}
388
389func TestGetCell(t *testing.T) {
390 b := makeBufferForTesting(80, 20)
391 writeRaw(b, []rune("Hello")...)
392 b.carriageReturn()
393 b.newLine()
394
395 writeRaw(b, []rune("there")...)
396 b.carriageReturn()
397 b.newLine()
398
399 writeRaw(b, []rune("something...")...)
400 cell := b.GetCell(8, 2)
401 require.NotNil(t, cell)
402 assert.Equal(t, 'g', cell.Rune().Rune)
403}
404
405func TestGetCellWithHistory(t *testing.T) {
406 b := makeBufferForTesting(80, 2)

Callers

nothing calls this directly

Calls 6

makeBufferForTestingFunction · 0.85
writeRawFunction · 0.85
carriageReturnMethod · 0.80
newLineMethod · 0.80
GetCellMethod · 0.80
RuneMethod · 0.80

Tested by

no test coverage detected