| Safe Haskell | Safe-Inferred |
|---|
Test.Golden
Description
This module provides a simplified interface. If you want more, see Test.Framework.Providers.Golden.Advanced
Documentation
Arguments
| :: TestName | test name |
| -> FilePath | path to the «golden» file (the file that contains correct output) |
| -> FilePath | path to the output file |
| -> IO () | action that creates the output file |
| -> Test | the test verifies that the output file contents is the same as the golden file contents |
Compare a given file contents against the golden file contents
Arguments
| :: TestName | test name |
| -> FilePath | path to the «golden» file (the file that contains correct output) |
| -> IO ByteString | action that returns a string |
| -> Test | the test verifies that the returned string is the same as the golden file contents |
Compare a given string against the golden file contents
Arguments
| :: TestName | test name |
| -> (FilePath -> FilePath -> [String]) | function that constructs the command line to invoke the diff command. E.g. \ref new -> ["diff", "-u", ref, new] |
| -> FilePath | path to the golden file |
| -> FilePath | path to the output file |
| -> IO () | action that produces the output file |
| -> Test |
Same as goldenVsFile, but invokes an external diff command.