Documentation
¶
Overview ¶
Package termtest provides utilities for testing terminal-based programs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithTerm ¶
func WithTerm()
WithTerm is an entry point for a command line program "with-term". Its usage is as follows:
with-term [options] script -- cmd [args ...]
It runs cmd with the given arguments inside a terminal emulator, using the script file to drive interactions with it.
The file contains a series of newline delimited commands.
await Enter a name feed Foo\r snapshot
See uitest.Script for more details on the script format. The following options may be provided before the script file.
- -cols int: terminal width (default 80)
- -rows int: terminal height (default 40)
- -fixed: don't auto-grow the terminal as output increases
- -final <name>: print a final snapshot on exit to stdout with the given name.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.