Add 'doctest' as a cabal test
We provide a simple wrapper that executes `doctest` on our `src` directory. This allows us to run all doctests during a regular `cabal test` run.
This commit is contained in:
parent
8b1755425c
commit
3cd99e3f0b
3 changed files with 27 additions and 7 deletions
|
|
@ -70,12 +70,12 @@
|
|||
haskellPackages.haskell-language-server
|
||||
haskellPackages.fourmolu
|
||||
haskellPackages.hspec-discover
|
||||
haskellPackages.doctest
|
||||
cabal-install
|
||||
ghcid
|
||||
nixfmt
|
||||
hpack
|
||||
hlint
|
||||
haskellPackages.doctest
|
||||
];
|
||||
};
|
||||
});
|
||||
|
|
|
|||
19
hcat.cabal
19
hcat.cabal
|
|
@ -50,6 +50,25 @@ executable hcat
|
|||
, hcat
|
||||
default-language: GHC2021
|
||||
|
||||
test-suite doctest
|
||||
type: exitcode-stdio-1.0
|
||||
main-is: Doctest.hs
|
||||
other-modules:
|
||||
Paths_hcat
|
||||
hs-source-dirs:
|
||||
test/doctest
|
||||
default-extensions:
|
||||
BlockArguments
|
||||
OverloadedStrings
|
||||
ImportQualifiedPost
|
||||
ghc-options: -Wall -fdefer-typed-holes
|
||||
build-tool-depends:
|
||||
doctest:doctest
|
||||
build-depends:
|
||||
base >=4.13 && <5
|
||||
, process
|
||||
default-language: Haskell2010
|
||||
|
||||
test-suite spec
|
||||
type: exitcode-stdio-1.0
|
||||
main-is: Spec.hs
|
||||
|
|
|
|||
13
package.yaml
13
package.yaml
|
|
@ -56,9 +56,10 @@ tests:
|
|||
build-tools: hspec-discover
|
||||
verbatim:
|
||||
default-language: GHC2021
|
||||
# doctest:
|
||||
# main: Doctest.hs
|
||||
# source-dirs:
|
||||
# - test/doctest
|
||||
# dependencies:
|
||||
# - process
|
||||
doctest:
|
||||
main: Doctest.hs
|
||||
source-dirs:
|
||||
- test/doctest
|
||||
dependencies:
|
||||
- process
|
||||
build-tools: doctest
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue