diff options
Diffstat (limited to 'org-test/Main.hs')
-rw-r--r-- | org-test/Main.hs | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/org-test/Main.hs b/org-test/Main.hs new file mode 100644 index 00000000..01658fd9 --- /dev/null +++ b/org-test/Main.hs @@ -0,0 +1,35 @@ +{-# LANGUAGE CPP #-} + + +import Data.Function +import System.Environment +import System.FilePath + +import Test.Haddock +import Test.Haddock.Utils + + +checkConfig :: CheckConfig String +checkConfig = CheckConfig + { ccfgRead = Just + , ccfgClean = const id + , ccfgDump = id + , ccfgEqual = (==) + } + + +dirConfig :: DirConfig +dirConfig = (defaultDirConfig $ takeDirectory __FILE__) + { dcfgCheckIgnore = checkIgnore + } + + +main :: IO () +main = do + cfg <- parseArgs checkConfig dirConfig =<< getArgs + runAndCheck $ cfg + { cfgHaddockArgs = cfgHaddockArgs cfg ++ ["--org"] + } + +checkIgnore :: FilePath -> Bool +checkIgnore file = takeExtension file /= ".org" |