tests

package
v3.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertF

func AssertF(t *testing.T, b bool, fmt string, args ...any)

AssertF validates the condition, and aborts the test if it fails.

func CheckAttrs

func CheckAttrs(t *testing.T, term MockTerm, x Col, y Row, a Attr)

CheckAttrs verifies the attributes of a given cell.

func CheckColors

func CheckColors(t *testing.T, term MockTerm, x Col, y Row, fg color.Color, bg color.Color)

CheckColors verifies the colors of a given cell.

func CheckContent

func CheckContent(t *testing.T, term MockTerm, x Col, y Row, s string)

CheckContent verifies the content at a given cell of the terminal.

func CheckPos

func CheckPos(t *testing.T, term MockTerm, x Col, y Row)

CheckPos is verifies the current cursor position of terminal.

func CheckRead

func CheckRead(t *testing.T, term MockTerm, want string)

CheckRead verifies that a read matches.

func MustClose

func MustClose(t *testing.T, term MockTerm)

MustClose closes or calls Fatalf.

func MustStart

func MustStart(t *testing.T, term MockTerm)

MustStart starts the terminal or calls Fatalf.

func ReadF

func ReadF(t *testing.T, term MockTerm) string

ReadF reads content from the term and returns it as a string.

func VerifyF

func VerifyF(t *testing.T, b bool, fmt string, args ...any)

VerifyF validates the condition, printing the message on failure.

func WriteF

func WriteF(t *testing.T, term MockTerm, str string, args ...any)

WriteF writes the string, and ensures it is fully flushed before returning.

Types

type Attr

type Attr = vt.Attr

type Col

type Col = vt.Col

type Coord

type Coord = vt.Coord

type MockTerm

type MockTerm = vt.MockTerm

type Row

type Row = vt.Row

Jump to

Keyboard shortcuts

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