Write shell sessions. Run them as tests.
A .shout file is just a shell session. Commands start with $, everything else is expected output.
$ echo hello
hello
$ ls missing
ls: missing: No such file or directory
[1]
$ brew --version
Homebrew ...
... matches anything — inline or across lines. [1] asserts the exit code.
$ shout
...............
15 passed in 23ms
Each file gets a fresh temp directory and its own /bin/sh session. State carries between commands within a file.
$ shout --update
Rewrites your .shout files with the actual output. No more copy-pasting from the terminal.
... matches anything — inline for partial lines, standalone for multiple lines.
[N] asserts a specific exit code. [*] matches any non-zero code.
--parallel runs test files concurrently. Each gets its own shell.
--timeout 5s per-command timeout. Supports ms, s, m.
--path ./bin prepends to PATH. Test your local builds.
-v prints each command as it runs. See what's happening.