Open phadej opened 3 months ago
It turns out tasty very much had all building blocks to allow specifying initial option set. This may solve #414
tasty
This PR is a draft, I'd welcome if anyone takes over as I did the least possible as a proof-of-concept (no haddocks for example).
The options-example "test-suite" is a demo.
options-example
cabal run options-example -- --help prints
cabal run options-example -- --help
--quickcheck-tests NUMBER Number of test cases for QuickCheck to generate. Underscores accepted: e.g. 10_000_000 (default: 1000)
(I made default value visible).
and if you run test the output is
options-example assoc: OK +++ OK, passed 1000 tests.
so the value is actually used. But it can still be overridden with --quickcheck-tests: cabal run options-example -- --quickcheck-tests 1234
--quickcheck-tests
cabal run options-example -- --quickcheck-tests 1234
options-example assoc: OK +++ OK, passed 1234 tests.
This patch is done on 10% Well-Typed time.
This looks a reasonable way to address the problem in #414, but I'm extremely cautious to extend API beyond absolutely necessary. I'd like to hear from other maintainers.
It turns out
tasty
very much had all building blocks to allow specifying initial option set. This may solve #414This PR is a draft, I'd welcome if anyone takes over as I did the least possible as a proof-of-concept (no haddocks for example).
The
options-example
"test-suite" is a demo.cabal run options-example -- --help
prints(I made default value visible).
and if you run test the output is
so the value is actually used. But it can still be overridden with
--quickcheck-tests
:cabal run options-example -- --quickcheck-tests 1234
This patch is done on 10% Well-Typed time.