diff options
-rw-r--r-- | Setup.hs | 6 | ||||
-rw-r--r-- | test/Doctest.hs | 13 | ||||
-rw-r--r-- | verifuzz.cabal | 19 |
3 files changed, 34 insertions, 4 deletions
@@ -1,2 +1,4 @@ -import Distribution.Simple -main = defaultMain +import Distribution.Extra.Doctest + +main :: IO () +main = defaultMainWithDoctests "verifuzz-doctest" diff --git a/test/Doctest.hs b/test/Doctest.hs index 736ea72..421f3d6 100644 --- a/test/Doctest.hs +++ b/test/Doctest.hs @@ -1 +1,12 @@ -{-# options_ghc -F -pgmF doctest-discover -optF test/doctest.json #-} +module Main where + +import Build_doctests (flags, module_sources, pkgs) +import Data.Foldable (traverse_) +import Test.DocTest (doctest) + +main :: IO () +main = do + traverse_ putStrLn args -- optionally print arguments + doctest args + where + args = flags ++ pkgs ++ module_sources diff --git a/verifuzz.cabal b/verifuzz.cabal index 5e92c68..598b92a 100644 --- a/verifuzz.cabal +++ b/verifuzz.cabal @@ -11,11 +11,17 @@ author: Yann Herklotz maintainer: yann [at] ymhg [dot] org copyright: 2018 Yann Herklotz category: Web -build-type: Simple +build-type: Custom cabal-version: >=1.10 extra-source-files: README.md , data/*.v +custom-setup + setup-depends: + base >= 4 && <5, + cabal-doctest >= 1 && <1.1, + Cabal >= 1.10 && <2.5 + library hs-source-dirs: src default-language: Haskell2010 @@ -106,3 +112,14 @@ test-suite verifuzz-test , text >=1.2 && <1.3 , parsec >= 3.1 && < 3.2 default-extensions: OverloadedStrings + +test-suite verifuzz-doctest + default-language: Haskell2010 + type: exitcode-stdio-1.0 + hs-source-dirs: test + main-is: Doctest.hs + ghc-options: -Wall -Werror + build-depends: base >=4.7 && <5 + , doctest >=0.16 && <0.17 + , verifuzz + default-extensions: OverloadedStrings |