From 57826aa5e8a0cd59f63d7d7681bd85ec7eb1ea2f Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Mon, 13 Jan 2014 00:01:16 -0500 Subject: [PATCH] Add a doctest suite with a big-ass caveat. --- htsn-import.cabal | 28 ++++++++++++++++++++++++++++ test/Doctests.hs | 12 ++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 test/Doctests.hs 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" ] -- 2.44.2