Array-Sticky
view release on metacpan or search on metacpan
t/lib/Test/Easy.pm view on Meta::CPAN
Test::More::diag(<<RUNNING);
Running $name...
RUNNING
local *{"$caller\::plan"} = sub {
my $num = pop;
my $tb = Test::More->builder;
if ($tb->{Have_Plan}) {
require Carp;
Carp::confess(<<DAMNIT_JIM_IM_A_DOCTOR_NOT_A_BOLOGNA_SANDWICH_WHO_PUTS_KALE_ON_THEIR_BOLOGNA_SANDWICH_ANYWAY_NOW_PLEASE_TAKE_THAT_OFF_MY_HEAD);
Dang. You've tried to use 'subtest()' in a test, which is totally cool,
even on this old version of Test::More $Test::More::VERSION, which
doesn't really implement a subtest()... except it's not cool, because
you already planned your tests, and this shim needs to fake out the
plan a bit in order to convince the test harness that all is well.
And unfortunately the plan's already been written out: there's no
nice way for me to recover it.
You can either:
t/lib/Test/Easy.pm view on Meta::CPAN
(b) change your useline for Test::More from something like this:
use Test::More tests => $tb->{Expected_Tests};
to something more like this:
use Test::More; END { done_testing() }
Yeah, I'm not a fan of done_testing() either, but those are your choices.
DAMNIT_JIM_IM_A_DOCTOR_NOT_A_BOLOGNA_SANDWICH_WHO_PUTS_KALE_ON_THEIR_BOLOGNA_SANDWICH_ANYWAY_NOW_PLEASE_TAKE_THAT_OFF_MY_HEAD
}
if (!$tb->{'Test::Easy::tampered'}++) {
$tb->{Expected_Tests} = 0;
}
$tb->{Expected_Tests} += $num;
};
$test->();
}
}
( run in 0.304 second using v1.01-cache-2.11-cpan-4e96b696675 )