diff options
author | Łukasz Hanuszczak <lukasz.hanuszczak@gmail.com> | 2015-08-18 20:43:52 +0200 |
---|---|---|
committer | Łukasz Hanuszczak <lukasz.hanuszczak@gmail.com> | 2015-08-22 23:40:27 +0200 |
commit | bb7d45db2b79f310ab8c2601b47399d5ac69e085 (patch) | |
tree | cc7ade68db8be033f6d7cfa5366443459515dd9b /haddock-test/src/Test/Haddock.hs | |
parent | c2a4125e3a5158078d8c172a840f7292dcf3ab28 (diff) |
Make it possible to specify ignored files for test output.
Diffstat (limited to 'haddock-test/src/Test/Haddock.hs')
-rw-r--r-- | haddock-test/src/Test/Haddock.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/haddock-test/src/Test/Haddock.hs b/haddock-test/src/Test/Haddock.hs index f31ec53f..581b0d10 100644 --- a/haddock-test/src/Test/Haddock.hs +++ b/haddock-test/src/Test/Haddock.hs @@ -38,7 +38,7 @@ checkFiles :: Config c -> IO () checkFiles cfg@(Config { .. }) = do putStrLn "Testing output files..." - files <- getDirectoryContents (cfgOutDir cfg) + files <- ignore <$> getDirectoryContents (cfgOutDir cfg) failed <- liftM catMaybes . forM files $ \file -> do putStr $ "Checking \"" ++ file ++ "\"... " @@ -56,6 +56,8 @@ checkFiles cfg@(Config { .. }) = do else do maybeDiff cfg failed exitFailure + where + ignore = filter (not . dcfgCheckIgnore cfgDirConfig) maybeDiff :: Config c -> [FilePath] -> IO () |