<div dir="auto">See<div dir="auto"><br></div><div dir="auto"><a href="https://stackoverflow.com/questions/8976488/quickcheck-exit-status-on-failures-and-cabal-integration">https://stackoverflow.com/questions/8976488/quickcheck-exit-status-on-failures-and-cabal-integration</a></div><div dir="auto"><br></div><div dir="auto">The gist is that you have to get the results of the QuickCheck test(s) and use them outside the QuickCheck context.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Aug 1, 2020, 6:15 AM Henning Thielemann <<a href="mailto:lemming@henning-thielemann.de">lemming@henning-thielemann.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
I have started an alternative implementation of 'doctest'. In contrast to <br>
the original one, doctest-extract extracts Haskell test-modules from <br>
doctest comments. This integrates better with Cabal and its package <br>
version resolution and the tests are compiled, not interpreted in GHCi. <br>
Disadvantage is that doctest-extract does not support all features of <br>
'doctest', e.g. IO-tests.<br>
<br>
I uploaded a preview as package candidates to Hackage:<br>
<br>
$ 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 <a href="https://hackage.haskell.org/package/$pkg/candidate/$pkg.tar.gz" rel="noreferrer noreferrer" target="_blank">https://hackage.haskell.org/package/$pkg/candidate/$pkg.tar.gz</a>; done)<br>
<br>
<br>
Extract test modules like so:<br>
<br>
$ doctest-extract -i src/ -o test/ --executable-main=Test/Main.hs --import-tested $$(cat test-module.list)<br>
<br>
<br>
There is still a problem: A failing QuickCheck test does not abort the <br>
whole test-suite. 'cabal test' will report success even if one QuickCheck <br>
property test fails. I wonder what is the proposed way to make a failing <br>
property fail the test-suite? I could use (QC.whenFail exitFailure). Is <br>
this the intended way?<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div>