aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMark Lentczner <markl@glyphic.com>2010-03-20 22:30:11 +0000
committerMark Lentczner <markl@glyphic.com>2010-03-20 22:30:11 +0000
commit76ca41c4746073c0dc31acd0fb651d06bca4243f (patch)
tree808a6a1d89252c57e343bdcaff52512fc78b7151 /tests
parent8771bb0a27598470f034c93128ac6848180f76b1 (diff)
First, experimental XHTML rendering
switch to using the xhtml package copied Html.hs to Xhtml.hs and split into sub-modules under Haddock/Backends/Xhtml and detabify moved footer into div, got ready for iface change headers converted to semantic markup contents in semantic markup summary as semantic markup description in semantic markup, info block in header fixed factored out rendering so during debug it can be readable (see renderToString)
Diffstat (limited to 'tests')
-rw-r--r--tests/README3
-rw-r--r--tests/runtests.hs6
2 files changed, 6 insertions, 3 deletions
diff --git a/tests/README b/tests/README
index 51baa82d..567c3b61 100644
--- a/tests/README
+++ b/tests/README
@@ -16,3 +16,6 @@ to copy all output into reference files
You can do
runhaskell runtests.hs all
to continue despite a failing test
+
+You can pass extra options to haddock like so
+ runhaskell runtests.hs --xhtml all
diff --git a/tests/runtests.hs b/tests/runtests.hs
index 2303e3d0..9ec3e2c5 100644
--- a/tests/runtests.hs
+++ b/tests/runtests.hs
@@ -61,9 +61,9 @@ check modules strict = do
test = do
contents <- getDirectoryContents "tests"
args <- getArgs
-
+ let (opts, spec) = span ("-" `isPrefixOf`) args
let mods =
- case args of
+ case spec of
x:_ | x /= "all" -> [x ++ ".hs"]
_ -> filter ((==) ".hs" . takeExtension) contents
@@ -86,7 +86,7 @@ test = do
let process = "-i " ++ processpath ++ "," ++ processpath ++ "process.haddock"
putStrLn "Running tests..."
- handle <- runProcess "../dist/build/haddock/haddock" (["-w", "-o", outdir, "-h", "--optghc=-fglasgow-exts", "--optghc=-w", base, process] ++ mods') Nothing (Just [("haddock_datadir", "../.")]) Nothing Nothing Nothing
+ handle <- runProcess "../dist/build/haddock/haddock" (["-w", "-o", outdir, "-h", "--optghc=-fglasgow-exts", "--optghc=-w", base, process] ++ opts ++ mods') Nothing (Just [("haddock_datadir", "../.")]) Nothing Nothing Nothing
code <- waitForProcess handle
when (code /= ExitSuccess) $ error "Haddock run failed! Exiting."
check mods (if not (null args) && args !! 0 == "all" then False else True)