]> gitweb.michael.orlitzky.com - dead/htsn-import.git/commitdiff
Add a doctest suite with a big-ass caveat.
authorMichael Orlitzky <michael@orlitzky.com>
Mon, 13 Jan 2014 05:01:16 +0000 (00:01 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Mon, 13 Jan 2014 05:01:16 +0000 (00:01 -0500)
htsn-import.cabal
test/Doctests.hs [new file with mode: 0644]

index 99df37f27359f157257a0b3c22b3969e4ac06e53..ab5bb7c13ae11e033f4aa7d1de62507b1802ff90 100644 (file)
@@ -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 (file)
index 0000000..d76d272
--- /dev/null
@@ -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" ]