diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2010-01-14 05:54:24 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2010-01-14 05:54:24 +0000 |
commit | 385dcb116c4f192416228f637a45e9a1392cd172 (patch) | |
tree | a37d99794fa84b6b37081ad42c228f9db7cf3911 | |
parent | cc41e1628546dfe76a5c94ebbe5ea7e363631176 (diff) |
Setup.hs: improved detection of highlighting support in test hook.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1808 788f1e2b-df1e-0410-8736-df70ead52e1b
-rw-r--r-- | Setup.hs | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -36,12 +36,10 @@ main = do exitWith ExitSuccess -- | Run test suite. -runTestSuite _ _ _ _ = do - tempPath <- catch getTemporaryDirectory (\_ -> return ".") - (outputPath, hOut) <- openTempFile tempPath "out" - runProcess "pandoc" ["--version"] Nothing Nothing Nothing (Just hOut) Nothing >>= waitForProcess - output <- readFile outputPath - let highlightingSupport = "with syntax highlighting" `isInfixOf` output +runTestSuite _ _ pkg _ = do + let isHighlightingKate (Dependency (PackageName "highlighting-kate") _) = True + isHighlightingKate _ = False + let highlightingSupport = any isHighlightingKate $ buildDepends pkg let testArgs = if highlightingSupport then ["lhs"] else [] let testCmd = "runhaskell -i.. RunTests.hs " ++ unwords testArgs inDirectory "tests" $ runCommand testCmd >>= waitForProcess >>= exitWith |