test-framework-golden-1.1.3.3: Golden tests support for test-framework

Safe HaskellNone
LanguageHaskell98

Test.Golden

Description

This module provides a simplified interface. If you want more, see Test.Golden.Advanced.

Synopsis

Documentation

goldenVsFile Source

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

goldenVsString Source

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

goldenVsFileDiff Source

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.

goldenVsStringDiff Source

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

-> IO ByteString

action that returns a string

-> Test 

Same as goldenVsString, but invokes an external diff command.