Skip to content

Commit 5b77196

Browse files
committed
Fix #854
1 parent b30fa0d commit 5b77196

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Changes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{{$NEXT}}
22

3+
- Fix done_testing(0) producing 2 plans and an incorrect message
4+
35
1.302194 2023-03-13 20:06:57-07:00 America/Los_Angeles
46

57
- Fix failing test on 5.10

lib/Test/Builder.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1670,7 +1670,7 @@ sub _ending {
16701670
return unless $plan || $count || $failed;
16711671

16721672
# Ran tests but never declared a plan or hit done_testing
1673-
if( !$hub->plan and $hub->count ) {
1673+
if( !defined($hub->plan) and $hub->count ) {
16741674
$self->diag("Tests were run but no plan was declared and done_testing() was not seen.");
16751675

16761676
if($real_exit_code) {

lib/Test2/Hub.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ sub finalize {
432432
$count = $self->{+COUNT};
433433
$failed = $self->{+FAILED};
434434

435-
if (($plan && $plan eq 'NO PLAN') || ($do_plan && !$plan)) {
435+
if ((defined($plan) && $plan eq 'NO PLAN') || ($do_plan && !defined($plan))) {
436436
$self->send(
437437
Test2::Event::Plan->new(
438438
trace => $trace,

0 commit comments

Comments
 (0)