Gold is a tool written in Zsh for golden testing on stdout/stderr of commands.
All pass | One passes, one fails |
---|---|
- Name test cases for easy identification in the output.
- Declarative approach, leveraging a Zsh file to provide configuration and resource files.
- Can be used to test software written in any language. The output of the binaries is what is tested.
- When a test case does not pass, the diff is nicely displayed using delta.
- Patch the golden files of failing test cases.
zsh
— https://zsh.sourceforge.io- In macOS this should already be installed.
delta
(optional) — https://github.com/dandavison/delta- Install with Homebrew:
brew install git-delta
.
- Install with Homebrew:
Execute the script install.zsh:
source install.zsh
See the built-in help with gold --help
.
For an example usage, refer to the directory test.
Example configuration run: ./gold test/pass_fail/config.zsh run-all
.