
See https://stackoverflow.com/questions/8976488/quickcheck-exit-status-on-failur... The gist is that you have to get the results of the QuickCheck test(s) and use them outside the QuickCheck context. On Sat, Aug 1, 2020, 6:15 AM Henning Thielemann < lemming@henning-thielemann.de> wrote:
I have started an alternative implementation of 'doctest'. In contrast to the original one, doctest-extract extracts Haskell test-modules from doctest comments. This integrates better with Cabal and its package version resolution and the tests are compiled, not interpreted in GHCi. Disadvantage is that doctest-extract does not support all features of 'doctest', e.g. IO-tests.
I uploaded a preview as package candidates to Hackage:
$ cabal install $(for pkg in doctest-extract-0.0 doctest-lib-0.0 utility-ht-0.0.16 non-empty-0.3.3; do echo https://hackage.haskell.org/package/$pkg/candidate/$pkg.tar.gz; done)
Extract test modules like so:
$ doctest-extract -i src/ -o test/ --executable-main=Test/Main.hs --import-tested $$(cat test-module.list)
There is still a problem: A failing QuickCheck test does not abort the whole test-suite. 'cabal test' will report success even if one QuickCheck property test fails. I wonder what is the proposed way to make a failing property fail the test-suite? I could use (QC.whenFail exitFailure). Is this the intended way? _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.