Documentation
¶
Overview ¶
Package termtest is a terminal for tests that run the program over a pipe: it takes what the program writes, as a terminal would, and says what the screen shows. The renderer writes only the cells that change between frames, so a word streamed over two frames is never whole in the bytes written; it is on the screen.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Term ¶
type Term struct {
// contains filtered or unexported fields
}
Term is a terminal of a fixed size. Its Write is the program's output.
func New ¶
New returns a terminal width columns wide and height rows tall. Close it when the program is done.
func (*Term) Close ¶
Close ends the terminal's answers. It closes the pipe they are written to rather than the emulator, whose Close races its Read.
func (*Term) Raw ¶
Raw is every byte the program wrote, for what is a command to the terminal rather than something it shows (the clipboard, a mode).