phile314 / tasty-silver

A fancy test runner for tasty and support for golden tests.
MIT License
11 stars 3 forks source link

Hackage version tasty-silver on Stackage Nightly Stackage LTS version Haskell-CI macOS windows

Tasty Silver

This package provides support for «golden testing».

A golden test is an IO action that writes its result to a file. To pass the test, this output file should be identical to the corresponding «golden» file, which contains the correct result for the test.

Interactive Mode

If the test runner is called with the -i option, the diff of any failing golden test is shown to the user. Based upon this diff, the user can choose to update the golden standard or to fix the test case as necessary. Interactive mode requires that at least git diff and less is available, or preferrably wdiff and colordiff for character-based diffs.

Portability

tasty-silver aims to work under Linux, macOS, and Windows. In particular, it should work in the GitHub CI virtual environments.

Known limitations:

Examples

For a non-trivial example see the Agda tests, which is used for testing the Agda compiler.

Maintainers

Philipp Hausmann is the primary maintainer. Andreas Abel is co-maintainer.