Popularity
1.7
Declining
Activity
0.0
Stable
0
3
0

Monthly Downloads: 6
Programming language: Haskell
License: LicenseRef-PublicDomain
Tags: Testing     Doctest    

doctest-discover-configurator alternatives and similar packages

Based on the "doctest" category.
Alternatively, view doctest-discover-configurator alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of doctest-discover-configurator or a related project?

Add another 'doctest' Package

README

doctest-discover-configurator

Note:

This is a fork of doctest-discover that removes the dependency on aeson and replaces it with configurator.


  • Do you have to maintain a list of source files that cabal needs to use to run doctests?

doctest-discover (inspired by hspec-discover) makes it easy to run doctests via cabal.

doctest-discover is published on hackage

The only thing you need to do is create a driver file with one line (let's call it doctest-driver.hs):

{-# OPTIONS_GHC -F -pgmF doctest-discover #-}

Use it as the main for the test-suite in your cabal file:

test-suite cooler-doctests
  default-language:   Haskell2010
  type:               exitcode-stdio-1.0
  ghc-options:        -threaded
  main-is:            doctest-driver.hs
  build-depends:      base >4 && <5, doctest, doctest-discover
  HS-Source-Dirs:     test

doctest-discover is used as a pre-processor. Since there is nothing to pre-process in the file, it builds a temporary file with the code needed to run doctests via cabal.

Configuration

Configuration uses the configurator package. Make sure you put the config file in the root directory of your project.

To use a config file, change your driver to add the config file name with the -optF flag.

{-# OPTIONS_GHC -F -pgmF doctest-discover -optF config.cfg #-}

Ignoring files

ignore = ["foo.hs", "bar.hs", "baz.hs"]

Source folders

ignore = ["foo.hs", "bar.hs", "baz.hs"],
sourceFolders = ["src", "src/foobar", "someOtherSource"]