Doctests for servant-server
This commit is contained in:
parent
1447221a16
commit
3b4b958110
2 changed files with 29 additions and 0 deletions
|
@ -108,3 +108,14 @@ test-suite spec
|
||||||
, wai
|
, wai
|
||||||
, wai-extra
|
, wai-extra
|
||||||
, warp
|
, warp
|
||||||
|
|
||||||
|
test-suite doctests
|
||||||
|
build-depends: base
|
||||||
|
, servant
|
||||||
|
, doctest
|
||||||
|
, filemanip
|
||||||
|
type: exitcode-stdio-1.0
|
||||||
|
main-is: test/Doctests.hs
|
||||||
|
buildable: True
|
||||||
|
default-language: Haskell2010
|
||||||
|
ghc-options: -threaded
|
||||||
|
|
18
servant-server/test/Doctests.hs
Normal file
18
servant-server/test/Doctests.hs
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
module Main where
|
||||||
|
|
||||||
|
import System.FilePath.Find
|
||||||
|
import Test.DocTest
|
||||||
|
|
||||||
|
main :: IO ()
|
||||||
|
main = do
|
||||||
|
files <- find always (extension ==? ".hs") "src"
|
||||||
|
doctest $ [ "-isrc"
|
||||||
|
, "-optP-include"
|
||||||
|
, "-optPdist/build/autogen/cabal_macros.h"
|
||||||
|
, "-XOverloadedStrings"
|
||||||
|
, "-XFlexibleInstances"
|
||||||
|
, "-XMultiParamTypeClasses"
|
||||||
|
, "-XDataKinds"
|
||||||
|
, "-XTypeOperators"
|
||||||
|
] ++ files
|
||||||
|
|
Loading…
Reference in a new issue