From 6bbe9e5df9e46ddf525d0a3fc4e492a0f203a6f7 Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Fri, 20 Sep 2013 21:10:31 +0900 Subject: [PATCH] add doctest. --- ghc-mod.cabal | 9 +++++++++ test/doctests.hs | 10 ++++++++++ 2 files changed, 19 insertions(+) create mode 100644 test/doctests.hs diff --git a/ghc-mod.cabal b/ghc-mod.cabal index d36c437..45ee4d4 100644 --- a/ghc-mod.cabal +++ b/ghc-mod.cabal @@ -87,6 +87,15 @@ Executable ghc-mod , ghc , ghc-mod +Test-Suite doctest + Type: exitcode-stdio-1.0 + Default-Language: Haskell2010 + HS-Source-Dirs: test + Ghc-Options: -threaded -Wall + Main-Is: doctests.hs + Build-Depends: base + , doctest >= 0.9.3 + Test-Suite spec Default-Language: Haskell2010 Main-Is: Spec.hs diff --git a/test/doctests.hs b/test/doctests.hs new file mode 100644 index 0000000..eda0263 --- /dev/null +++ b/test/doctests.hs @@ -0,0 +1,10 @@ +module Main where + +import Test.DocTest + +main :: IO () +main = doctest [ + "-package" + , "ghc" + , "Language/Haskell/GhcMod.hs" + ]