diff options
author | Łukasz Hanuszczak <lukasz.hanuszczak@gmail.com> | 2015-08-19 14:43:39 +0200 |
---|---|---|
committer | Łukasz Hanuszczak <lukasz.hanuszczak@gmail.com> | 2015-08-22 23:40:28 +0200 |
commit | acf526f68d0ecb3ddf4ddd6efcee7774cd8ffa54 (patch) | |
tree | 6ea861f124e38e052d691bbd3df4146e7f5c42be /hoogle-test | |
parent | 5bc022f12e3f35c609a047ca96fe4e8117763b0b (diff) |
Setup test suite for Hoogle backend.
Diffstat (limited to 'hoogle-test')
-rw-r--r-- | hoogle-test/Main.hs | 27 | ||||
-rwxr-xr-x | hoogle-test/run | 5 |
2 files changed, 32 insertions, 0 deletions
diff --git a/hoogle-test/Main.hs b/hoogle-test/Main.hs new file mode 100644 index 00000000..9da20c36 --- /dev/null +++ b/hoogle-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 ++ ["--hoogle"] + } diff --git a/hoogle-test/run b/hoogle-test/run new file mode 100755 index 00000000..5e17ad0f --- /dev/null +++ b/hoogle-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" $@ |