aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlatex-test/Main.hs27
-rwxr-xr-xlatex-test/run5
2 files changed, 32 insertions, 0 deletions
diff --git a/latex-test/Main.hs b/latex-test/Main.hs
new file mode 100755
index 00000000..2ee01a26
--- /dev/null
+++ b/latex-test/Main.hs
@@ -0,0 +1,27 @@
+{-# LANGUAGE CPP #-}
+
+
+import System.Environment
+import System.FilePath
+
+import Test.Haddock
+
+
+checkConfig :: CheckConfig String
+checkConfig = CheckConfig
+ { ccfgRead = \_ input -> Just input
+ , ccfgDump = id
+ , ccfgEqual = (==)
+ }
+
+
+dirConfig :: DirConfig
+dirConfig = defaultDirConfig $ takeDirectory __FILE__
+
+
+main :: IO ()
+main = do
+ cfg <- parseArgs checkConfig dirConfig =<< getArgs
+ runAndCheck $ cfg
+ { cfgHaddockArgs = cfgHaddockArgs cfg ++ ["--latex"]
+ }
diff --git a/latex-test/run b/latex-test/run
new file mode 100755
index 00000000..5e17ad0f
--- /dev/null
+++ b/latex-test/run
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+export HADDOCK_PATH=$(which haddock)
+LIB_PATH="$(dirname "$BASH_SOURCE")/../haddock-test/src/"
+runhaskell -i:"$LIB_PATH" "Main.hs" $@