Closed effectfully closed 4 months ago
Dunno, but maybe ignoring unrecognized options with a warning rather than failing hard would be a more flexible and forward-compatible approach in a test suite runner like tasty
?
Ignoring unrecognized options is dangerous: it is too easy for a typo to remain unnoticed with potentially disastrous effect.
It is easy to introduce a dummy dependency or add a dummy Ingredient
or (even better) combine all test suites into a single executable, so I don't find fiddling with command line parsing justified.
I'm inclined to close as won't fix. There is includingOptions
ingredient precisely to register additional command-line options if needed.
We use
tasty
withcabal
's internal libraries and some of our test suites depend ontasty-golden
while others don't, so runningcabal test library-test --test-options "--accept"
fails withwhich sometimes terminates the other tests and sometimes doesn't.
I guess it would be possible to implement an
Ingredient
that comes last, accepts any option and ignores it? But at that point it would be simpler to just introduce a dummy dependency ontasty-golden
.Am I missing something? Is there a way to ignore unrecognized options?
Thank you for the great library!