aboutsummaryrefslogtreecommitdiff
path: root/html-test/run.hs
blob: 2758bf56c0be97822645024d8b450f0766187a15 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{-# LANGUAGE CPP #-}


import System.Environment
import System.FilePath

import Test.Haddock
import Test.Haddock.Xhtml

import qualified Text.XML.Light as Xml


checkConfig :: CheckConfig Xml.Element
checkConfig = CheckConfig
    { ccfgRead = \_ input -> strip <$> Xml.parseXMLDoc input
    , ccfgDump = Xml.ppElement
    , ccfgEqual = (==)
    }


dirConfig :: DirConfig
dirConfig = defaultDirConfig $ takeDirectory __FILE__


main :: IO ()
main = runAndCheck =<< parseArgs checkConfig dirConfig =<< getArgs


-- *** OLD TEST RUNNER UTILITY FUNCTIONS ***
-- These are considered bad and should be replaced as soon as possible.


-- | List of modules in which we don't 'stripLinks'
preserveLinksModules :: [String]
preserveLinksModules = ["Bug253"]