# from Michael G Schwern # on Sunday 30 March 2008 22:57: >> 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. 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 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? --Eric -- Minimum wage help gives you minimum service. --David Schomer --------------------------------------------------- http://scratchcomputing.com ---------------------------------------------------