![]() |
|
Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Bailing out from Test::More after 'some' failuresby Perlbotics (Bishop) |
on May 15, 2019 at 18:26 UTC ( #11100035=note: print w/replies, xml ) | Need Help?? |
Quick'n dirty. Uses the fact, that Test::More::builder() is not overridden.
Result:
Can be done properly by deriving your own class, but you get the idea. You need one more test than the limit, though. The interception happens before the next test case is executed. Limit = N demands N+1 tests, but I guess that is acceptable... Edit: This implements an individual per-test-file-limit. If you want the limit to encompass the whole test session, you'll need to maintain the counter's persistency and life-cycle across all sessions (i.e. using Storable).
In Section
Seekers of Perl Wisdom
|
|