mirror of
https://github.com/simonmichael/hledger.git
synced 2024-11-07 21:15:19 +03:00
;re-enable doctest suite, with a workaround for cabal 3 (#1139)
This commit is contained in:
parent
c5779b00b1
commit
3565f49acf
@ -6,3 +6,14 @@ packages: hledger-lib
|
||||
allow-newer:
|
||||
brick:base
|
||||
config-ini:containers
|
||||
|
||||
-- generate a ghc environment file, needed by doctest
|
||||
-- (eg: ./.ghc.environment.x86_64-darwin-8.8.3).
|
||||
-- cabal 3 doesn't write these by default.
|
||||
-- https://github.com/simonmichael/hledger/issues/1139
|
||||
-- https://github.com/sol/doctest/issues/245#issuecomment-583171683
|
||||
-- cabal 2 doesn't understand this flag, but it's just a warning; should be ok.
|
||||
-- cabal 3 still fails with doctest the first time; you have to run it
|
||||
-- a second time. Hopefully in practice it won't fail, because of a
|
||||
-- preceding cabal build.
|
||||
write-ghc-environment-files: always
|
||||
|
@ -4,7 +4,7 @@ cabal-version: 1.12
|
||||
--
|
||||
-- see: https://github.com/sol/hpack
|
||||
--
|
||||
-- hash: 4f9a789b279703a75cecaf4e5cca835f20a5ddb9cfeb9e98e62db665a573d016
|
||||
-- hash: 3d3dab519880fdc9325ef53cd2811154ab38f1e15f6e59e3d0b2b1c935d40337
|
||||
|
||||
name: hledger-lib
|
||||
version: 1.17.0.1
|
||||
@ -199,7 +199,6 @@ test-suite doctest
|
||||
, transformers >=0.2
|
||||
, uglymemo
|
||||
, utf8-string >=0.3.5
|
||||
buildable: False
|
||||
if (impl(ghc < 8.2))
|
||||
buildable: False
|
||||
default-language: Haskell2010
|
||||
|
@ -164,10 +164,10 @@ tests:
|
||||
dependencies:
|
||||
- hledger-lib
|
||||
|
||||
# Running this test suite with cabal requires cabal exec:
|
||||
# cabal exec -- cabal test hledger-lib:test:doctest
|
||||
# Note when run by cabal, doctest requires a ghc environment file,
|
||||
# so we ensure this is generated, see cabal.project.
|
||||
# https://github.com/simonmichael/hledger/issues/1139
|
||||
doctest:
|
||||
buildable: false # doesn't run with cabal test, https://github.com/simonmichael/hledger/issues/1139
|
||||
source-dirs: test
|
||||
main: doctests.hs # can't call it doctest.hs ("File name does not match module name")
|
||||
other-modules: [] # prevent double compilation, https://github.com/sol/hpack/issues/188
|
||||
|
Loading…
Reference in New Issue
Block a user