diff options
author | Ben Gamari <ben@smart-cactus.org> | 2016-02-08 14:25:49 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-02-08 14:54:56 +0100 |
commit | 4ca91adcbd26dfa5f102244f8170c5c74f5200db (patch) | |
tree | c46673b85fba14b889940bd9b4e09cc9dd9490e0 /haddock-test/src/Test/Haddock | |
parent | 25b8d00a149098d9b7842600dbb93f40836b4546 (diff) |
testsuite: Rework handling of output sanitization
Previously un-cleaned artifacts were kept as reference output, making
it difficult to tell what has changed and causing spurious changes in
the version control history. Here we rework this, cleaning the output
during acceptance. To accomplish this it was necessary to move to strict
I/O to ensure the reference handle was closed before accept attempts to
open the reference file.
Diffstat (limited to 'haddock-test/src/Test/Haddock')
-rw-r--r-- | haddock-test/src/Test/Haddock/Config.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/haddock-test/src/Test/Haddock/Config.hs b/haddock-test/src/Test/Haddock/Config.hs index cd878178..dea101d8 100644 --- a/haddock-test/src/Test/Haddock/Config.hs +++ b/haddock-test/src/Test/Haddock/Config.hs @@ -42,7 +42,11 @@ data TestPackage = TestPackage data CheckConfig c = CheckConfig - { ccfgRead :: String -> String -> Maybe c + { ccfgRead :: String -> Maybe c + -- ^ @f contents@ parses file contents @contents@ to + -- produce a thing to be compared. + , ccfgClean :: String -> c -> c + -- ^ @f fname x@ cleans @x@ to such that it can be compared , ccfgDump :: c -> String , ccfgEqual :: c -> c -> Bool } |