disable doctests conditionally
This commit is contained in:
+9
-3
@@ -1,10 +1,16 @@
|
||||
{-# LANGUAGE DoAndIfThenElse #-}
|
||||
module Main where
|
||||
|
||||
#ifndef GYEHOEK_NO_DOCTEST
|
||||
import Test.DocTest (mainFromCabal)
|
||||
import System.Environment (getArgs, lookupEnv)
|
||||
#endif
|
||||
import System.Environment (getArgs)
|
||||
import System.IO (stderr, hPutStrLn)
|
||||
|
||||
|
||||
main :: IO ()
|
||||
main = mainFromCabal "gyehoek" =<< getArgs
|
||||
main =
|
||||
#ifndef GYEHOEK_NO_DOCTEST
|
||||
mainFromCabal "gyehoek" =<< getArgs
|
||||
#else
|
||||
hPutStrLn stderr "skipping doctests due to broken nix environment."
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user