in reply to Re^2: Unit test of script fails unless Test::Warnings is used?!
in thread Unit test of script fails unless Test::Warnings is used?!
"Edit: How would I replicate the OP's BAIL_OUT semantics when using lives_ok?"
:-)lives_ok sub { require 'script' } or BAIL_OUT("bin/script did not load: $@");
To make your test suite stop any time a test fails:
(Although you cannot control the output as with BAIL_OUT, and it will apply to all tests in the file.)use Test::Most 'die';
(Note that Test::Most loads Test::More and Test::Exception as well as others and warnings and strict.)
Hope this helps!
Update: showed one-test solution first
|
|---|