test

package
v0.0.0-...-0962f0d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestBackend

type TestBackend struct {
	Mouse   mathi.Vec2
	Pressed bool
	// contains filtered or unexported fields
}

TestBackend accumulates the pushed cell diffs like a real terminal, so after any Finish its grid equals that frame's front buffer.

func New

func New(t *testing.T, width, height int) (*timui.Timui, *TestBackend)

func (*TestBackend) CheckSnapshot

func (b *TestBackend) CheckSnapshot(path string)

func (*TestBackend) MousePosition

func (b *TestBackend) MousePosition() mathi.Vec2

func (*TestBackend) MousePressed

func (b *TestBackend) MousePressed(key timui.Key) bool

func (*TestBackend) Render

func (b *TestBackend) Render()

func (*TestBackend) Set

func (b *TestBackend) Set(pos mathi.Vec2, char rune, fg, bg uint32)

func (*TestBackend) Size

func (b *TestBackend) Size() mathi.Vec2

func (*TestBackend) String

func (b *TestBackend) String() string

String frames the screen so snapshot files keep their trailing spaces even through editors that trim whitespace.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL