From: Michael Orlitzky Date: Mon, 13 Jan 2014 05:01:16 +0000 (-0500) Subject: Add a doctest suite with a big-ass caveat. X-Git-Tag: 0.0.1~83 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=57826aa5e8a0cd59f63d7d7681bd85ec7eb1ea2f;p=dead%2Fhtsn-import.git Add a doctest suite with a big-ass caveat. --- diff --git a/htsn-import.cabal b/htsn-import.cabal index 99df37f..ab5bb7c 100644 --- a/htsn-import.cabal +++ b/htsn-import.cabal @@ -171,6 +171,34 @@ test-suite testsuite -O2 +test-suite doctests + type: exitcode-stdio-1.0 + hs-source-dirs: test + main-is: Doctests.hs + build-depends: + base == 4.*, + -- Additional test dependencies. + doctest == 0.9.* + + -- It's not entirely clear to me why I have to reproduce all of this. + ghc-options: + -Wall + -fwarn-hi-shadowing + -fwarn-missing-signatures + -fwarn-name-shadowing + -fwarn-orphans + -fwarn-type-defaults + -fwarn-tabs + -fwarn-incomplete-record-updates + -fwarn-monomorphism-restriction + -fwarn-unused-do-bind + -rtsopts + -threaded + -optc-O3 + -optc-march=native + -O2 + + source-repository head type: git location: http://michael.orlitzky.com/git/htsn-import.git diff --git a/test/Doctests.hs b/test/Doctests.hs new file mode 100644 index 0000000..d76d272 --- /dev/null +++ b/test/Doctests.hs @@ -0,0 +1,12 @@ +module Main where + +import Test.DocTest ( doctest ) + +-- | There's some kind of goddamned bug causing the doctests to commit +-- suicide when run on src/Main.hs. Since we only have doctests in +-- TSN.Codegen for now, just test that. +-- +main :: IO () +main = doctest [ "-isrc", + "-idist/build/autogen", + "src/TSN/Codegen.hs" ]