aboutsummaryrefslogtreecommitdiff
path: root/Setup.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2011-01-15 09:25:01 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2011-01-15 09:25:01 -0800
commita0e19ba8aaa9304e9b0d1079e8357412e0402d0d (patch)
treeaee2a1569a601a2f32714549ac27a52ce9550c2d /Setup.hs
parent8ad6e013fc55013ccdcf0ff4c7fbc9fc5e886ab3 (diff)
parentdc93073804acecaf883d099ef3e1d067a29c9951 (diff)
downloadpandoc-a0e19ba8aaa9304e9b0d1079e8357412e0402d0d.tar.gz
Merge branch 'tests'
Diffstat (limited to 'Setup.hs')
-rw-r--r--Setup.hs11
1 files changed, 3 insertions, 8 deletions
diff --git a/Setup.hs b/Setup.hs
index 455909795..829115642 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -38,17 +38,12 @@ main = do
-- | Run test suite.
runTestSuite :: Args -> Bool -> PackageDescription -> LocalBuildInfo -> IO a
-runTestSuite _ _ pkg lbi = do
+runTestSuite args _ pkg lbi = do
let testDir = buildDir lbi </> "test-pandoc"
testDir' <- canonicalizePath testDir
+ let testArgs = concatMap (\arg -> ["-t",arg]) args
if any id [buildable (buildInfo exe) | exe <- executables pkg, exeName exe == "test-pandoc"]
- then do
- let isHighlightingKate (Dependency (PackageName "highlighting-kate") _) = True
- isHighlightingKate _ = False
- let highlightingSupport = any isHighlightingKate $ buildDepends pkg
- let testArgs = ["lhs" | highlightingSupport]
- inDirectory "tests" $ rawSystem (testDir' </> "test-pandoc")
- testArgs >>= exitWith
+ then inDirectory "tests" $ rawSystem (testDir' </> "test-pandoc") testArgs >>= exitWith
else do
putStrLn "Build pandoc with the 'tests' flag to run tests"
exitWith $ ExitFailure 3