Documentation
¶
Overview ¶
Package screen drives loupe's full-screen programs the way a human at a terminal does: keys go in through a pipe, and each step waits for the screen to show its result rather than for time to pass, so a test never races the program, however slowly a step such as publishing runs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Screen ¶
type Screen struct {
// contains filtered or unexported fields
}
func Start ¶
func Start(t testing.TB, width, height int, fn func(stdin io.Reader, stdout, stderr io.Writer) int) *Screen
Start runs fn on its own goroutine. fn reads the keys Screen sends from stdin, and everything it writes to stdout or stderr is what the screen shows.
func (*Screen) Press ¶
Press sends each named key on its own: a key from the keys table, or a single character.