diff options
author | Simon Hengel <sol@typeful.net> | 2012-10-15 10:41:29 +0200 |
---|---|---|
committer | Simon Hengel <sol@typeful.net> | 2012-10-15 19:32:42 +0200 |
commit | f21570e5526ce564ac8abeff5310cf753f86ffb8 (patch) | |
tree | 839b107e49337fc613c0798fec04ccddb6a65e9e /html-test/runtests.hs | |
parent | 958d64d77572c47d249965d7146ac17a23de806d (diff) |
Move HTML reference renderings to /html-test/ref/
Diffstat (limited to 'html-test/runtests.hs')
-rw-r--r-- | html-test/runtests.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/html-test/runtests.hs b/html-test/runtests.hs index 292deb8b..1898cde3 100644 --- a/html-test/runtests.hs +++ b/html-test/runtests.hs @@ -26,6 +26,7 @@ dataDir = packageRoot </> "resources" haddockPath = packageRoot </> "dist" </> "build" </> "haddock" </> "haddock" testSuiteRoot = packageRoot </> "html-test" testDir = testSuiteRoot </> "tests" +refDir = testSuiteRoot </> "ref" outDir = testSuiteRoot </> "output" @@ -102,12 +103,11 @@ test = do check :: [FilePath] -> Bool -> IO () check modules strict = do forM_ modules $ \mod -> do - let outfile = outDir </> dropExtension mod ++ ".html" - let reffile = testDir </> dropExtension mod ++ ".html.ref" + let outfile = outDir </> dropExtension mod ++ ".html" + let reffile = refDir </> dropExtension mod ++ ".html" b <- doesFileExist reffile if b then do - copyFile reffile (outDir </> takeFileName reffile) out <- readFile outfile ref <- readFile reffile if not $ haddockEq out ref @@ -116,7 +116,7 @@ check modules strict = do let ref' = stripLinks ref out' = stripLinks out let reffile' = outDir </> takeFileName reffile ++ ".nolinks" - outfile' = outDir </> takeFileName outfile ++ ".nolinks" + outfile' = outDir </> takeFileName outfile ++ ".ref.nolinks" writeFile reffile' ref' writeFile outfile' out' r <- programOnPath "colordiff" |