Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adopting the standard way to use doctest.

  • Loading branch information...
commit 31874063966b6c74e279701dd496997e907c0e6b 1 parent cc86566
@kazu-yamamoto authored
Showing with 13 additions and 34 deletions.
  1. +0 −11 Doctests.hs
  2. +4 −23 dns.cabal
  3. +9 −0 test2/doctests.hs
View
11 Doctests.hs
@@ -1,11 +0,0 @@
-module Main
-where
-
-import Test.DocTest
-import System.FilePath.Find ((==?), always, extension, find)
-
-find_sources :: IO [FilePath]
-find_sources = find always (extension ==? ".hs") "Network"
-
-main :: IO ()
-main = find_sources >>= doctest
View
27 dns.cabal
@@ -88,33 +88,14 @@ Test-Suite spec
, network-conduit
, random
--- The only dependencies we need to /build/ the doctest suite are
--- base, doctest, and filemanip. If you want to be able to /run/ them,
--- however, you're going to need the rest of the deps that might be
--- used in the examples.
-Test-Suite doctests
+Test-Suite doctest
Type: exitcode-stdio-1.0
Default-Language: Haskell2010
- Hs-Source-Dirs: .
+ Hs-Source-Dirs: test2
Ghc-Options: -Wall
- Main-Is: Doctests.hs
+ Main-Is: doctests.hs
Build-Depends: base
- , attoparsec
- , attoparsec-conduit
- , binary
- , blaze-builder
- , bytestring
- , conduit >= 0.5
- , containers
- , dns
- , doctest >= 0.9
- , filemanip == 0.3.*
- , hspec
- , iproute >= 1.2.4
- , mtl
- , network >= 2.3
- , network-conduit
- , random
+ , doctest
Source-Repository head
Type: git
View
9 test2/doctests.hs
@@ -0,0 +1,9 @@
+module Main where
+
+import Test.DocTest
+
+main :: IO ()
+main = doctest [
+ "-XOverloadedStrings"
+ , "Network/DNS.hs"
+ ]
Please sign in to comment.
Something went wrong with that request. Please try again.