diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2009-02-14 16:25:39 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2009-02-14 16:25:39 +0000 |
commit | a39865af036af7f1a03d4c9dd07e637084af8ae0 (patch) | |
tree | 1a2865932bd4eaa6aac5abaf74ee2a062d9ce8c6 /Setup.hs | |
parent | 1a15c46eef0a10387324595ebcee497835380e2c (diff) | |
download | pandoc-a39865af036af7f1a03d4c9dd07e637084af8ae0.tar.gz |
Check to see if highlighting supported and run lhs tests if it is.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@1542 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'Setup.hs')
-rw-r--r-- | Setup.hs | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1,4 +1,6 @@ import Distribution.Simple +import Distribution.Package ( pkgName ) +import Distribution.Simple.LocalBuildInfo ( packageDeps ) import Distribution.PackageDescription ( emptyHookedBuildInfo ) import Control.Exception ( bracket_ ) import Control.Monad ( unless ) @@ -17,8 +19,11 @@ main = do exitWith ExitSuccess -- | Run test suite. -runTestSuite _ _ _ _ = do - inDirectory "tests" $ runCommand "runhaskell -i.. RunTests.hs" >>= waitForProcess >>= exitWith +runTestSuite _ _ _ local = do + let highlightingSupport = (PackageName "highlighting-kate") `elem` (map pkgName $ packageDeps local) + let testArgs = if highlightingSupport then ["lhs"] else [] + let testCmd = "runhaskell -i.. RunTests.hs " ++ unwords testArgs + inDirectory "tests" $ runCommand testCmd >>= waitForProcess >>= exitWith -- | Build man pages from markdown sources in man/man1/. makeManPages _ _ _ _ = do |