Skip to content

Commit

Permalink
match doctest 0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
sakari committed Mar 26, 2012
1 parent 985c833 commit 051efa9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
7 changes: 1 addition & 6 deletions src/Test/Framework/Providers/DocTest.hs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ After getting the doctests we can execute the doctests using the
>>> :m + Data.Monoid >>> :m + Data.Monoid
>>> defaultMainWithOpts [doctests] noColors >>> defaultMainWithOpts [doctests] noColors
DocTest: DocTest:
tests/Test.hs: Test:
print "abc": [Failed] print "abc": [Failed]
expression `print "abc"' expression `print "abc"'
expected: ["\"fail\""] expected: ["\"fail\""]
Expand All @@ -34,7 +34,6 @@ The @*** Exception: ExitFailure 1@ is caused by


module Test.Framework.Providers.DocTest (docTest) where module Test.Framework.Providers.DocTest (docTest) where


import Documentation.Haddock
import qualified Test.DocTest as DocTest import qualified Test.DocTest as DocTest
import Test.Framework import Test.Framework
import Test.Framework.Providers.HUnit import Test.Framework.Providers.HUnit
Expand All @@ -43,11 +42,7 @@ import Data.Monoid


noColors :: RunnerOptions noColors :: RunnerOptions
noColors = mempty { noColors = mempty {
#if MIN_VERSION_test_framework(0,5,0)
ropt_color_mode = Nothing ropt_color_mode = Nothing
#else
ropt_plain_output = Just True
#endif
} }


-- | Note that 'docTest' can be called only once per process execution -- | Note that 'docTest' can be called only once per process execution
Expand Down
20 changes: 9 additions & 11 deletions test-framework-doctest.cabal
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: test-framework-doctest Name: test-framework-doctest
Version: 0.2.0.1 Version: 0.2.1
Synopsis: Test.Framework wrapper for DocTest Synopsis: Test.Framework wrapper for DocTest
Description: Test.Framework wrapper for DocTest Description: Test.Framework wrapper for DocTest
License: BSD3 License: BSD3
Expand All @@ -21,27 +21,25 @@ Source-repository head
Source-repository this Source-repository this
type: git type: git
location: git://github.com/sakari/test-framework-doctest.git location: git://github.com/sakari/test-framework-doctest.git
tag: 0.2.0.1 tag: 0.2.1


test-suite doctest test-suite doctest
main-is: Main.hs main-is: Main.hs
default-language: Haskell98 default-language: Haskell98
type: exitcode-stdio-1.0 type: exitcode-stdio-1.0
hs-source-dirs: src, tests hs-source-dirs: tests
build-depends: build-depends:
base >= 4 && < 5, base >= 4 && < 5,
test-framework >= 0.4, test-framework >= 0.6,
test-framework-hunit >= 0.2, test-framework-doctest >= 0.2.1
doctest >= 0.6,
haddock


Library Library
Hs-source-dirs: src Hs-source-dirs: src
default-language: Haskell98 default-language: Haskell98
Exposed-modules: Test.Framework.Providers.DocTest Exposed-modules: Test.Framework.Providers.DocTest
Build-depends: Build-depends:
base >= 4 && < 5, base >= 4 && < 5,
doctest >= 0.6, doctest >= 0.6 && < 0.7,
test-framework >= 0.4, test-framework >= 0.6,
test-framework-hunit >= 0.2, test-framework-hunit >= 0.2
haddock

0 comments on commit 051efa9

Please sign in to comment.