in reply to Re^3: Use die() instead of exit() in Test::More
in thread Use die() instead of exit() in Test::More
our $OUTPUT = ''; my $fh = IO::Handle->new(); open($fh, '>', \$OUTPUT); # Catch all output Test::More->builder->output($fh); Test::More->builder->failure_output($fh); Test::More->builder->todo_output($fh); ..testcode.. BAIL_OUT(..or other exit...) END { # This is called even after exit(), so I can access the output print STDOUT $OUTPUT; }
|
|---|