diff --git a/Changes b/Changes index 2ca6a7393..cda40ae29 100644 --- a/Changes +++ b/Changes @@ -2,6 +2,10 @@ - Fix #882 +1.302195 2023-04-28 05:55:54-07:00 America/Los_Angeles + + - Fix done_testing(0) producing 2 plans and an incorrect message + 1.302194 2023-03-13 20:06:57-07:00 America/Los_Angeles - Fix failing test on 5.10 diff --git a/Makefile.PL b/Makefile.PL index 9440dbd05..ee3a6a657 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -23,7 +23,7 @@ my %WriteMakefileArgs = ( "Storable" => 0, "utf8" => 0 }, - "VERSION" => "1.302195", + "VERSION" => "1.302196", "test" => { "TESTS" => "t/*.t t/Legacy/*.t t/Legacy/Bugs/*.t t/Legacy/Builder/*.t t/Legacy/Regression/*.t t/Legacy/Simple/*.t t/Legacy/Test2/*.t t/Legacy/Tester/*.t t/Legacy/subtest/*.t t/Legacy_And_Test2/*.t t/Test2/acceptance/*.t t/Test2/behavior/*.t t/Test2/legacy/*.t t/Test2/modules/*.t t/Test2/modules/API/*.t t/Test2/modules/API/InterceptResult/*.t t/Test2/modules/Event/*.t t/Test2/modules/Event/TAP/*.t t/Test2/modules/EventFacet/*.t t/Test2/modules/Formatter/*.t t/Test2/modules/Hub/*.t t/Test2/modules/Hub/Interceptor/*.t t/Test2/modules/IPC/*.t t/Test2/modules/IPC/Driver/*.t t/Test2/modules/Tools/*.t t/Test2/modules/Util/*.t t/Test2/regression/*.t t/regression/*.t" } diff --git a/lib/Test/Builder.pm b/lib/Test/Builder.pm index 2b6c91881..ea759f6e0 100644 --- a/lib/Test/Builder.pm +++ b/lib/Test/Builder.pm @@ -4,7 +4,7 @@ use 5.006; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; BEGIN { if( $] < 5.008 ) { @@ -1670,7 +1670,7 @@ sub _ending { return unless $plan || $count || $failed; # Ran tests but never declared a plan or hit done_testing - if( !$hub->plan and $hub->count ) { + if( !defined($hub->plan) and $hub->count ) { $self->diag("Tests were run but no plan was declared and done_testing() was not seen."); if($real_exit_code) { diff --git a/lib/Test/Builder/Formatter.pm b/lib/Test/Builder/Formatter.pm index 266fa3d2c..9e4a8ef83 100644 --- a/lib/Test/Builder/Formatter.pm +++ b/lib/Test/Builder/Formatter.pm @@ -2,7 +2,7 @@ package Test::Builder::Formatter; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; BEGIN { require Test2::Formatter::TAP; our @ISA = qw(Test2::Formatter::TAP) } diff --git a/lib/Test/Builder/Module.pm b/lib/Test/Builder/Module.pm index b16be2e5c..f68d3f0a9 100644 --- a/lib/Test/Builder/Module.pm +++ b/lib/Test/Builder/Module.pm @@ -7,7 +7,7 @@ use Test::Builder; require Exporter; our @ISA = qw(Exporter); -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; =head1 NAME diff --git a/lib/Test/Builder/Tester.pm b/lib/Test/Builder/Tester.pm index a7055c084..14aa4ebf7 100644 --- a/lib/Test/Builder/Tester.pm +++ b/lib/Test/Builder/Tester.pm @@ -1,7 +1,7 @@ package Test::Builder::Tester; use strict; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use Test::Builder; use Symbol; diff --git a/lib/Test/Builder/Tester/Color.pm b/lib/Test/Builder/Tester/Color.pm index 4043e6970..5900cefa4 100644 --- a/lib/Test/Builder/Tester/Color.pm +++ b/lib/Test/Builder/Tester/Color.pm @@ -1,7 +1,7 @@ package Test::Builder::Tester::Color; use strict; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; require Test::Builder::Tester; diff --git a/lib/Test/Builder/TodoDiag.pm b/lib/Test/Builder/TodoDiag.pm index a16ae88e5..2318dd7c9 100644 --- a/lib/Test/Builder/TodoDiag.pm +++ b/lib/Test/Builder/TodoDiag.pm @@ -2,7 +2,7 @@ package Test::Builder::TodoDiag; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; BEGIN { require Test2::Event::Diag; our @ISA = qw(Test2::Event::Diag) } diff --git a/lib/Test/More.pm b/lib/Test/More.pm index 1e4449e34..affc1ab6e 100644 --- a/lib/Test/More.pm +++ b/lib/Test/More.pm @@ -17,7 +17,7 @@ sub _carp { return warn @_, " at $file line $line\n"; } -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use Test::Builder::Module; our @ISA = qw(Test::Builder::Module); @@ -1206,13 +1206,28 @@ sub _format_stack { return $out; } +my %_types = ( + (map +($_ => $_), qw( + Regexp + ARRAY + HASH + SCALAR + REF + GLOB + CODE + )), + 'LVALUE' => 'SCALAR', + 'REF' => 'SCALAR', + 'VSTRING' => 'SCALAR', +); + sub _type { my $thing = shift; return '' if !ref $thing; - for my $type (qw(Regexp ARRAY HASH REF SCALAR GLOB CODE VSTRING)) { - return $type if UNIVERSAL::isa( $thing, $type ); + for my $type (keys %_types) { + return $_types{$type} if UNIVERSAL::isa( $thing, $type ); } return ''; diff --git a/lib/Test/Simple.pm b/lib/Test/Simple.pm index 1a5284e48..b760a865b 100644 --- a/lib/Test/Simple.pm +++ b/lib/Test/Simple.pm @@ -4,7 +4,7 @@ use 5.006; use strict; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use Test::Builder::Module; our @ISA = qw(Test::Builder::Module); diff --git a/lib/Test/Tester.pm b/lib/Test/Tester.pm index eb37e0d2f..1b2501cb4 100644 --- a/lib/Test/Tester.pm +++ b/lib/Test/Tester.pm @@ -18,7 +18,7 @@ require Exporter; use vars qw( @ISA @EXPORT ); -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; @EXPORT = qw( run_tests check_tests check_test cmp_results show_space ); @ISA = qw( Exporter ); diff --git a/lib/Test/Tester/Capture.pm b/lib/Test/Tester/Capture.pm index 3e7dc370c..837992a1c 100644 --- a/lib/Test/Tester/Capture.pm +++ b/lib/Test/Tester/Capture.pm @@ -2,7 +2,7 @@ use strict; package Test::Tester::Capture; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use Test::Builder; diff --git a/lib/Test/Tester/CaptureRunner.pm b/lib/Test/Tester/CaptureRunner.pm index 72d25b7fe..819757e3d 100644 --- a/lib/Test/Tester/CaptureRunner.pm +++ b/lib/Test/Tester/CaptureRunner.pm @@ -3,7 +3,7 @@ use strict; package Test::Tester::CaptureRunner; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use Test::Tester::Capture; diff --git a/lib/Test/Tester/Delegate.pm b/lib/Test/Tester/Delegate.pm index ca3d2a1d0..0ec02bbba 100644 --- a/lib/Test/Tester/Delegate.pm +++ b/lib/Test/Tester/Delegate.pm @@ -3,7 +3,7 @@ use warnings; package Test::Tester::Delegate; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use Scalar::Util(); diff --git a/lib/Test/use/ok.pm b/lib/Test/use/ok.pm index a6e4bab78..3ea118aa1 100644 --- a/lib/Test/use/ok.pm +++ b/lib/Test/use/ok.pm @@ -1,7 +1,7 @@ package Test::use::ok; use 5.005; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; __END__ diff --git a/lib/Test2.pm b/lib/Test2.pm index 35391f375..b45acfec2 100644 --- a/lib/Test2.pm +++ b/lib/Test2.pm @@ -2,7 +2,7 @@ package Test2; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; 1; diff --git a/lib/Test2/API.pm b/lib/Test2/API.pm index 678daa5ea..6234de919 100644 --- a/lib/Test2/API.pm +++ b/lib/Test2/API.pm @@ -10,7 +10,7 @@ BEGIN { $ENV{TEST2_ACTIVE} = 1; } -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; my $INST; diff --git a/lib/Test2/API/Breakage.pm b/lib/Test2/API/Breakage.pm index 4f6026254..31ee5d16f 100644 --- a/lib/Test2/API/Breakage.pm +++ b/lib/Test2/API/Breakage.pm @@ -2,7 +2,7 @@ package Test2::API::Breakage; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use Test2::Util qw/pkg_to_file/; diff --git a/lib/Test2/API/Context.pm b/lib/Test2/API/Context.pm index bf240f83b..eb5fddeed 100644 --- a/lib/Test2/API/Context.pm +++ b/lib/Test2/API/Context.pm @@ -2,7 +2,7 @@ package Test2::API::Context; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use Carp qw/confess croak/; diff --git a/lib/Test2/API/Instance.pm b/lib/Test2/API/Instance.pm index 8606ae7c7..922d71c35 100644 --- a/lib/Test2/API/Instance.pm +++ b/lib/Test2/API/Instance.pm @@ -2,7 +2,7 @@ package Test2::API::Instance; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; our @CARP_NOT = qw/Test2::API Test2::API::Instance Test2::IPC::Driver Test2::Formatter/; use Carp qw/confess carp/; diff --git a/lib/Test2/API/InterceptResult.pm b/lib/Test2/API/InterceptResult.pm index 9030dd9bb..a01aa3ead 100644 --- a/lib/Test2/API/InterceptResult.pm +++ b/lib/Test2/API/InterceptResult.pm @@ -2,7 +2,7 @@ package Test2::API::InterceptResult; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use Scalar::Util qw/blessed/; use Test2::Util qw/pkg_to_file/; diff --git a/lib/Test2/API/InterceptResult/Event.pm b/lib/Test2/API/InterceptResult/Event.pm index 6a74425f2..64fc2b122 100644 --- a/lib/Test2/API/InterceptResult/Event.pm +++ b/lib/Test2/API/InterceptResult/Event.pm @@ -2,7 +2,7 @@ package Test2::API::InterceptResult::Event; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use List::Util qw/first/; use Test2::Util qw/pkg_to_file/; diff --git a/lib/Test2/API/InterceptResult/Facet.pm b/lib/Test2/API/InterceptResult/Facet.pm index 5d79ce774..d879f0fb4 100644 --- a/lib/Test2/API/InterceptResult/Facet.pm +++ b/lib/Test2/API/InterceptResult/Facet.pm @@ -2,7 +2,7 @@ package Test2::API::InterceptResult::Facet; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; BEGIN { require Test2::EventFacet; diff --git a/lib/Test2/API/InterceptResult/Hub.pm b/lib/Test2/API/InterceptResult/Hub.pm index 3fa3740bd..d315c11ce 100644 --- a/lib/Test2/API/InterceptResult/Hub.pm +++ b/lib/Test2/API/InterceptResult/Hub.pm @@ -2,7 +2,7 @@ package Test2::API::InterceptResult::Hub; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; BEGIN { require Test2::Hub; our @ISA = qw(Test2::Hub) } use Test2::Util::HashBase; diff --git a/lib/Test2/API/InterceptResult/Squasher.pm b/lib/Test2/API/InterceptResult/Squasher.pm index f10bab654..bcbb00651 100644 --- a/lib/Test2/API/InterceptResult/Squasher.pm +++ b/lib/Test2/API/InterceptResult/Squasher.pm @@ -2,7 +2,7 @@ package Test2::API::InterceptResult::Squasher; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use Carp qw/croak/; use List::Util qw/first/; diff --git a/lib/Test2/API/Stack.pm b/lib/Test2/API/Stack.pm index 8879b42dc..3ced04274 100644 --- a/lib/Test2/API/Stack.pm +++ b/lib/Test2/API/Stack.pm @@ -2,7 +2,7 @@ package Test2::API::Stack; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use Test2::Hub(); diff --git a/lib/Test2/Event.pm b/lib/Test2/Event.pm index 04f22da21..5afdb17e5 100644 --- a/lib/Test2/Event.pm +++ b/lib/Test2/Event.pm @@ -2,7 +2,7 @@ package Test2::Event; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use Scalar::Util qw/blessed reftype/; use Carp qw/croak/; diff --git a/lib/Test2/Event/Bail.pm b/lib/Test2/Event/Bail.pm index 2f2ba19d8..5338ce6a4 100644 --- a/lib/Test2/Event/Bail.pm +++ b/lib/Test2/Event/Bail.pm @@ -2,7 +2,7 @@ package Test2::Event::Bail; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) } diff --git a/lib/Test2/Event/Diag.pm b/lib/Test2/Event/Diag.pm index 06149729a..30baeec86 100644 --- a/lib/Test2/Event/Diag.pm +++ b/lib/Test2/Event/Diag.pm @@ -2,7 +2,7 @@ package Test2::Event::Diag; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) } diff --git a/lib/Test2/Event/Encoding.pm b/lib/Test2/Event/Encoding.pm index e9c16dccb..72ffeab2d 100644 --- a/lib/Test2/Event/Encoding.pm +++ b/lib/Test2/Event/Encoding.pm @@ -2,7 +2,7 @@ package Test2::Event::Encoding; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use Carp qw/croak/; diff --git a/lib/Test2/Event/Exception.pm b/lib/Test2/Event/Exception.pm index 1b2f675fc..a6d84a940 100644 --- a/lib/Test2/Event/Exception.pm +++ b/lib/Test2/Event/Exception.pm @@ -2,7 +2,7 @@ package Test2::Event::Exception; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) } diff --git a/lib/Test2/Event/Fail.pm b/lib/Test2/Event/Fail.pm index f1b8aa890..8ac4b0319 100644 --- a/lib/Test2/Event/Fail.pm +++ b/lib/Test2/Event/Fail.pm @@ -2,7 +2,7 @@ package Test2::Event::Fail; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use Test2::EventFacet::Info; diff --git a/lib/Test2/Event/Generic.pm b/lib/Test2/Event/Generic.pm index 488553753..f4a5866f5 100644 --- a/lib/Test2/Event/Generic.pm +++ b/lib/Test2/Event/Generic.pm @@ -5,7 +5,7 @@ use warnings; use Carp qw/croak/; use Scalar::Util qw/reftype/; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) } use Test2::Util::HashBase; diff --git a/lib/Test2/Event/Note.pm b/lib/Test2/Event/Note.pm index dc21622f5..bc733e245 100644 --- a/lib/Test2/Event/Note.pm +++ b/lib/Test2/Event/Note.pm @@ -2,7 +2,7 @@ package Test2::Event::Note; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) } diff --git a/lib/Test2/Event/Ok.pm b/lib/Test2/Event/Ok.pm index 96a7cd0f4..cdfd61602 100644 --- a/lib/Test2/Event/Ok.pm +++ b/lib/Test2/Event/Ok.pm @@ -2,7 +2,7 @@ package Test2::Event::Ok; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) } diff --git a/lib/Test2/Event/Pass.pm b/lib/Test2/Event/Pass.pm index d65ca99de..4d71bd528 100644 --- a/lib/Test2/Event/Pass.pm +++ b/lib/Test2/Event/Pass.pm @@ -2,7 +2,7 @@ package Test2::Event::Pass; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use Test2::EventFacet::Info; diff --git a/lib/Test2/Event/Plan.pm b/lib/Test2/Event/Plan.pm index bab8b4962..1f627e871 100644 --- a/lib/Test2/Event/Plan.pm +++ b/lib/Test2/Event/Plan.pm @@ -2,7 +2,7 @@ package Test2::Event::Plan; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) } diff --git a/lib/Test2/Event/Skip.pm b/lib/Test2/Event/Skip.pm index 351a81bd3..191f1daff 100644 --- a/lib/Test2/Event/Skip.pm +++ b/lib/Test2/Event/Skip.pm @@ -2,7 +2,7 @@ package Test2::Event::Skip; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; BEGIN { require Test2::Event::Ok; our @ISA = qw(Test2::Event::Ok) } diff --git a/lib/Test2/Event/Subtest.pm b/lib/Test2/Event/Subtest.pm index 100c0ac81..7331d2ab5 100644 --- a/lib/Test2/Event/Subtest.pm +++ b/lib/Test2/Event/Subtest.pm @@ -2,7 +2,7 @@ package Test2::Event::Subtest; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; BEGIN { require Test2::Event::Ok; our @ISA = qw(Test2::Event::Ok) } use Test2::Util::HashBase qw{subevents buffered subtest_id subtest_uuid start_stamp stop_stamp}; diff --git a/lib/Test2/Event/TAP/Version.pm b/lib/Test2/Event/TAP/Version.pm index c10673dbe..20895ecad 100644 --- a/lib/Test2/Event/TAP/Version.pm +++ b/lib/Test2/Event/TAP/Version.pm @@ -2,7 +2,7 @@ package Test2::Event::TAP::Version; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use Carp qw/croak/; diff --git a/lib/Test2/Event/V2.pm b/lib/Test2/Event/V2.pm index 1bf15a8b6..44b1edbc3 100644 --- a/lib/Test2/Event/V2.pm +++ b/lib/Test2/Event/V2.pm @@ -2,7 +2,7 @@ package Test2::Event::V2; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use Scalar::Util qw/reftype/; use Carp qw/croak/; diff --git a/lib/Test2/Event/Waiting.pm b/lib/Test2/Event/Waiting.pm index 3066583fd..d52cba23b 100644 --- a/lib/Test2/Event/Waiting.pm +++ b/lib/Test2/Event/Waiting.pm @@ -2,7 +2,7 @@ package Test2::Event::Waiting; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) } diff --git a/lib/Test2/EventFacet.pm b/lib/Test2/EventFacet.pm index c15ea4028..8b2027e4d 100644 --- a/lib/Test2/EventFacet.pm +++ b/lib/Test2/EventFacet.pm @@ -2,7 +2,7 @@ package Test2::EventFacet; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use Test2::Util::HashBase qw/-details/; use Carp qw/croak/; diff --git a/lib/Test2/EventFacet/About.pm b/lib/Test2/EventFacet/About.pm index 785f43e33..d6f2d6a6e 100644 --- a/lib/Test2/EventFacet/About.pm +++ b/lib/Test2/EventFacet/About.pm @@ -2,7 +2,7 @@ package Test2::EventFacet::About; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) } use Test2::Util::HashBase qw{ -package -no_display -uuid -eid }; diff --git a/lib/Test2/EventFacet/Amnesty.pm b/lib/Test2/EventFacet/Amnesty.pm index 71e2ef10b..4fc02b0aa 100644 --- a/lib/Test2/EventFacet/Amnesty.pm +++ b/lib/Test2/EventFacet/Amnesty.pm @@ -2,7 +2,7 @@ package Test2::EventFacet::Amnesty; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; sub is_list { 1 } diff --git a/lib/Test2/EventFacet/Assert.pm b/lib/Test2/EventFacet/Assert.pm index d93b7a84b..9e4574cf4 100644 --- a/lib/Test2/EventFacet/Assert.pm +++ b/lib/Test2/EventFacet/Assert.pm @@ -2,7 +2,7 @@ package Test2::EventFacet::Assert; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) } use Test2::Util::HashBase qw{ -pass -no_debug -number }; diff --git a/lib/Test2/EventFacet/Control.pm b/lib/Test2/EventFacet/Control.pm index f59399674..fdc159bdd 100644 --- a/lib/Test2/EventFacet/Control.pm +++ b/lib/Test2/EventFacet/Control.pm @@ -2,7 +2,7 @@ package Test2::EventFacet::Control; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) } use Test2::Util::HashBase qw{ -global -terminate -halt -has_callback -encoding -phase }; diff --git a/lib/Test2/EventFacet/Error.pm b/lib/Test2/EventFacet/Error.pm index b64e1e928..e36f079a8 100644 --- a/lib/Test2/EventFacet/Error.pm +++ b/lib/Test2/EventFacet/Error.pm @@ -2,7 +2,7 @@ package Test2::EventFacet::Error; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; sub facet_key { 'errors' } sub is_list { 1 } diff --git a/lib/Test2/EventFacet/Hub.pm b/lib/Test2/EventFacet/Hub.pm index b23d93e5c..90f550864 100644 --- a/lib/Test2/EventFacet/Hub.pm +++ b/lib/Test2/EventFacet/Hub.pm @@ -2,7 +2,7 @@ package Test2::EventFacet::Hub; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; sub is_list { 1 } sub facet_key { 'hubs' } diff --git a/lib/Test2/EventFacet/Info.pm b/lib/Test2/EventFacet/Info.pm index 55a804444..dbc50cbe2 100644 --- a/lib/Test2/EventFacet/Info.pm +++ b/lib/Test2/EventFacet/Info.pm @@ -2,7 +2,7 @@ package Test2::EventFacet::Info; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; sub is_list { 1 } diff --git a/lib/Test2/EventFacet/Info/Table.pm b/lib/Test2/EventFacet/Info/Table.pm index ba4700db4..923f50459 100644 --- a/lib/Test2/EventFacet/Info/Table.pm +++ b/lib/Test2/EventFacet/Info/Table.pm @@ -2,7 +2,7 @@ package Test2::EventFacet::Info::Table; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use Carp qw/confess/; diff --git a/lib/Test2/EventFacet/Meta.pm b/lib/Test2/EventFacet/Meta.pm index c97ee5f87..f0fd9b9ac 100644 --- a/lib/Test2/EventFacet/Meta.pm +++ b/lib/Test2/EventFacet/Meta.pm @@ -2,7 +2,7 @@ package Test2::EventFacet::Meta; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) } use vars qw/$AUTOLOAD/; diff --git a/lib/Test2/EventFacet/Parent.pm b/lib/Test2/EventFacet/Parent.pm index cecee3ea9..37a707c05 100644 --- a/lib/Test2/EventFacet/Parent.pm +++ b/lib/Test2/EventFacet/Parent.pm @@ -2,7 +2,7 @@ package Test2::EventFacet::Parent; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use Carp qw/confess/; diff --git a/lib/Test2/EventFacet/Plan.pm b/lib/Test2/EventFacet/Plan.pm index 68b2a8d82..223e54505 100644 --- a/lib/Test2/EventFacet/Plan.pm +++ b/lib/Test2/EventFacet/Plan.pm @@ -2,7 +2,7 @@ package Test2::EventFacet::Plan; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) } use Test2::Util::HashBase qw{ -count -skip -none }; diff --git a/lib/Test2/EventFacet/Render.pm b/lib/Test2/EventFacet/Render.pm index f6c7c70a2..86252262f 100644 --- a/lib/Test2/EventFacet/Render.pm +++ b/lib/Test2/EventFacet/Render.pm @@ -2,7 +2,7 @@ package Test2::EventFacet::Render; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; sub is_list { 1 } diff --git a/lib/Test2/EventFacet/Trace.pm b/lib/Test2/EventFacet/Trace.pm index 2685a20da..540227d93 100644 --- a/lib/Test2/EventFacet/Trace.pm +++ b/lib/Test2/EventFacet/Trace.pm @@ -2,7 +2,7 @@ package Test2::EventFacet::Trace; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) } diff --git a/lib/Test2/Formatter.pm b/lib/Test2/Formatter.pm index 16c2ad771..2ede44dcb 100644 --- a/lib/Test2/Formatter.pm +++ b/lib/Test2/Formatter.pm @@ -2,7 +2,7 @@ package Test2::Formatter; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; my %ADDED; diff --git a/lib/Test2/Formatter/TAP.pm b/lib/Test2/Formatter/TAP.pm index 245523705..59bef85a3 100644 --- a/lib/Test2/Formatter/TAP.pm +++ b/lib/Test2/Formatter/TAP.pm @@ -2,7 +2,7 @@ package Test2::Formatter::TAP; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use Test2::Util qw/clone_io/; diff --git a/lib/Test2/Hub.pm b/lib/Test2/Hub.pm index ba0a6c94b..f52c2f07c 100644 --- a/lib/Test2/Hub.pm +++ b/lib/Test2/Hub.pm @@ -2,7 +2,7 @@ package Test2::Hub; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use Carp qw/carp croak confess/; @@ -432,7 +432,7 @@ sub finalize { $count = $self->{+COUNT}; $failed = $self->{+FAILED}; - if (($plan && $plan eq 'NO PLAN') || ($do_plan && !$plan)) { + if ((defined($plan) && $plan eq 'NO PLAN') || ($do_plan && !defined($plan))) { $self->send( Test2::Event::Plan->new( trace => $trace, diff --git a/lib/Test2/Hub/Interceptor.pm b/lib/Test2/Hub/Interceptor.pm index 03bd7a9ed..fad94c915 100644 --- a/lib/Test2/Hub/Interceptor.pm +++ b/lib/Test2/Hub/Interceptor.pm @@ -2,7 +2,7 @@ package Test2::Hub::Interceptor; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use Test2::Hub::Interceptor::Terminator(); diff --git a/lib/Test2/Hub/Interceptor/Terminator.pm b/lib/Test2/Hub/Interceptor/Terminator.pm index 4386e98b1..0e46e8bde 100644 --- a/lib/Test2/Hub/Interceptor/Terminator.pm +++ b/lib/Test2/Hub/Interceptor/Terminator.pm @@ -2,7 +2,7 @@ package Test2::Hub::Interceptor::Terminator; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; 1; diff --git a/lib/Test2/Hub/Subtest.pm b/lib/Test2/Hub/Subtest.pm index d2539b2e3..d2a7cb39b 100644 --- a/lib/Test2/Hub/Subtest.pm +++ b/lib/Test2/Hub/Subtest.pm @@ -2,7 +2,7 @@ package Test2::Hub::Subtest; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; BEGIN { require Test2::Hub; our @ISA = qw(Test2::Hub) } use Test2::Util::HashBase qw/nested exit_code manual_skip_all/; diff --git a/lib/Test2/IPC.pm b/lib/Test2/IPC.pm index dc56e7247..459c0a9f5 100644 --- a/lib/Test2/IPC.pm +++ b/lib/Test2/IPC.pm @@ -2,7 +2,7 @@ package Test2::IPC; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use Test2::API::Instance; diff --git a/lib/Test2/IPC/Driver.pm b/lib/Test2/IPC/Driver.pm index 2414c774a..37937ff75 100644 --- a/lib/Test2/IPC/Driver.pm +++ b/lib/Test2/IPC/Driver.pm @@ -2,7 +2,7 @@ package Test2::IPC::Driver; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use Carp qw/confess/; diff --git a/lib/Test2/IPC/Driver/Files.pm b/lib/Test2/IPC/Driver/Files.pm index 15cb1a4c8..f33ee76ac 100644 --- a/lib/Test2/IPC/Driver/Files.pm +++ b/lib/Test2/IPC/Driver/Files.pm @@ -2,7 +2,7 @@ package Test2::IPC::Driver::Files; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; BEGIN { require Test2::IPC::Driver; our @ISA = qw(Test2::IPC::Driver) } diff --git a/lib/Test2/Tools/Tiny.pm b/lib/Test2/Tools/Tiny.pm index 1f1836e6d..713c502a6 100644 --- a/lib/Test2/Tools/Tiny.pm +++ b/lib/Test2/Tools/Tiny.pm @@ -16,7 +16,7 @@ use Test2::API qw/context run_subtest test2_stack/; use Test2::Hub::Interceptor(); use Test2::Hub::Interceptor::Terminator(); -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; BEGIN { require Exporter; our @ISA = qw(Exporter) } our @EXPORT = qw{ diff --git a/lib/Test2/Util.pm b/lib/Test2/Util.pm index 9ce991ccf..dc69ecda9 100644 --- a/lib/Test2/Util.pm +++ b/lib/Test2/Util.pm @@ -2,7 +2,7 @@ package Test2::Util; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use POSIX(); use Config qw/%Config/; diff --git a/lib/Test2/Util/ExternalMeta.pm b/lib/Test2/Util/ExternalMeta.pm index 67bfe79a1..f6752456a 100644 --- a/lib/Test2/Util/ExternalMeta.pm +++ b/lib/Test2/Util/ExternalMeta.pm @@ -2,7 +2,7 @@ package Test2::Util::ExternalMeta; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use Carp qw/croak/; diff --git a/lib/Test2/Util/Facets2Legacy.pm b/lib/Test2/Util/Facets2Legacy.pm index 0225ad8d2..c545b933b 100644 --- a/lib/Test2/Util/Facets2Legacy.pm +++ b/lib/Test2/Util/Facets2Legacy.pm @@ -2,7 +2,7 @@ package Test2::Util::Facets2Legacy; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use Carp qw/croak confess/; use Scalar::Util qw/blessed/; diff --git a/lib/Test2/Util/HashBase.pm b/lib/Test2/Util/HashBase.pm index 45bb53be1..8f5c899cf 100644 --- a/lib/Test2/Util/HashBase.pm +++ b/lib/Test2/Util/HashBase.pm @@ -2,7 +2,7 @@ package Test2::Util::HashBase; use strict; use warnings; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; ################################################################# # # diff --git a/lib/Test2/Util/Trace.pm b/lib/Test2/Util/Trace.pm index 8307b1e3e..4f4beae4b 100644 --- a/lib/Test2/Util/Trace.pm +++ b/lib/Test2/Util/Trace.pm @@ -6,7 +6,7 @@ use strict; our @ISA = ('Test2::EventFacet::Trace'); -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; 1; diff --git a/lib/ok.pm b/lib/ok.pm index d16fcb396..ded842adb 100644 --- a/lib/ok.pm +++ b/lib/ok.pm @@ -1,5 +1,5 @@ package ok; -our $VERSION = '1.302195'; +our $VERSION = '1.302196'; use strict; use Test::More (); diff --git a/t/Legacy/is_deeply_fail.t b/t/Legacy/is_deeply_fail.t old mode 100644 new mode 100755 index c43b3a2e1..cab70e267 --- a/t/Legacy/is_deeply_fail.t +++ b/t/Legacy/is_deeply_fail.t @@ -26,7 +26,7 @@ package main; my $TB = Test::Builder->create; -$TB->plan(tests => 102); +$TB->plan(tests => 110); # Utility testing functions. sub ok ($;$) { @@ -428,3 +428,31 @@ ERR ok !is_deeply( [\\$version1], [\\$version2], "version objects"); is( $out, "not ok 42 - version objects\n" ); } + +{ + my $version1 = v1.2.3; + my $version2 = '' . v1.2.3; + ok is_deeply( [\$version1], [\$version2], "version objects"); + is( $out, "ok 43 - version objects\n" ); +} + +{ + my $version1 = v1.2.3; + my $version2 = v1.2.3; + ok !is_deeply( [$version1], [\$version2], "version objects"); + is( $out, "not ok 44 - version objects\n" ); +} + +{ + my $string = "abc"; + my $string2 = "b"; + ok is_deeply( [\substr($string, 1, 1)], [\$string2], "lvalue ref"); + is( $out, "ok 45 - lvalue ref\n" ); +} + +{ + my $string = "b"; + my $string2 = "b"; + ok !is_deeply( [\substr($string, 1, 1)], ["b"], "lvalue ref"); + is( $out, "not ok 46 - lvalue ref\n" ); +}