Eric Wilhelm wrote:
What it protects you from is dying half-way through the tests
without the harness noticing...
Death is noted by both Test::More and Test::Harness and has been for a
long time....

The only way you can abort the test halfway through using no_plan and
get a success is with an exit(0).

Yes.  That's exactly the reason that I want a done() with my no_plan.

That scenario is extremely rare, but I've considered adding in an exit() override to detect it.

I'm not sure how that would work. You would have to assign it to *CORE::GLOBAL::exit and Test::More would have to be the first module loaded.

That's what I'd do.


If you just replace it lexically, you've covered exactly the opposite of the case I'm concerned about. I can *see* an exit() in my test file (and I sometimes include one when a big chunk of test is broken (yeah, yeah... let's not talk about that right now.))

The plan there would be to have Test::More to export an exit that exhibited no warning, however....


The exit() that concerns me when testing with no_plan is the "WTF?" way off somewhere else which absolutely shouldn't be there. Is there any way to catch that without the done() token?

...a "done testing" marker renders all this irrelevant.


--
29. The Irish MPs are not after “Me frosted lucky charms”.
    -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army
           http://skippyslist.com/list/

Reply via email to