From 4ca91adcbd26dfa5f102244f8170c5c74f5200db Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Mon, 8 Feb 2016 14:25:49 +0100 Subject: 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. --- hypsrc-test/Main.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hypsrc-test') diff --git a/hypsrc-test/Main.hs b/hypsrc-test/Main.hs index 0490be47..01cc5429 100644 --- a/hypsrc-test/Main.hs +++ b/hypsrc-test/Main.hs @@ -13,7 +13,8 @@ import Test.Haddock.Xhtml checkConfig :: CheckConfig Xml checkConfig = CheckConfig - { ccfgRead = \_ input -> strip <$> parseXml input + { ccfgRead = parseXml + , ccfgClean = \_ -> strip , ccfgDump = dumpXml , ccfgEqual = (==) } -- cgit v1.2.3