Hello community, here is the log from the commit of package perl-Test-Simple for openSUSE:Factory checked in at 2017-10-11 22:55:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Test-Simple (Old) and /work/SRC/openSUSE:Factory/.perl-Test-Simple.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Test-Simple" Wed Oct 11 22:55:42 2017 rev:7 rq:532925 version:1.302098 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Test-Simple/perl-Test-Simple.changes 2017-09-13 21:34:59.490885003 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Test-Simple.new/perl-Test-Simple.changes 2017-10-11 22:55:43.419711184 +0200 @@ -1,0 +2,27 @@ +Mon Oct 9 05:57:21 UTC 2017 - [email protected] + +- updated to 1.302098 + see /usr/share/doc/packages/perl-Test-Simple/Changes + + 1.302098 2017-10-03 06:13:49-07:00 America/Los_Angeles + + - Add docs for test2_stdout and test2_stderr + - Fix 5.6 support + +------------------------------------------------------------------- +Tue Oct 3 06:14:54 UTC 2017 - [email protected] + +- updated to 1.302097 + see /usr/share/doc/packages/perl-Test-Simple/Changes + + 1.302097 2017-10-02 19:35:08-07:00 America/Los_Angeles + + - Fix hub->process bug that could let an error pass + - Fix #789 (Modification of read only value) + - Fix typo in Test::Builder when looking for IPC (#777) + - Fix #791, clone_io broke on scalar io layer + - Fix #790 and #756, Exception event stingify exception + - Localize $^E in context (#780) + - Fix test that failed in verbose mode (#770) + +------------------------------------------------------------------- Old: ---- Test-Simple-1.302096.tar.gz New: ---- Test-Simple-1.302098.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Test-Simple.spec ++++++ --- /var/tmp/diff_new_pack.91SnGp/_old 2017-10-11 22:55:43.951687855 +0200 +++ /var/tmp/diff_new_pack.91SnGp/_new 2017-10-11 22:55:43.967687153 +0200 @@ -17,7 +17,7 @@ Name: perl-Test-Simple -Version: 1.302096 +Version: 1.302098 Release: 0 %define cpan_name Test-Simple Summary: Basic utilities for writing tests ++++++ Test-Simple-1.302096.tar.gz -> Test-Simple-1.302098.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/Changes new/Test-Simple-1.302098/Changes --- old/Test-Simple-1.302096/Changes 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/Changes 2017-10-03 15:13:51.000000000 +0200 @@ -1,6 +1,21 @@ +1.302098 2017-10-03 06:13:49-07:00 America/Los_Angeles + + - Add docs for test2_stdout and test2_stderr + - Fix 5.6 support + +1.302097 2017-10-02 19:35:08-07:00 America/Los_Angeles + + - Fix hub->process bug that could let an error pass + - Fix #789 (Modification of read only value) + - Fix typo in Test::Builder when looking for IPC (#777) + - Fix #791, clone_io broke on scalar io layer + - Fix #790 and #756, Exception event stingify exception + - Localize $^E in context (#780) + - Fix test that failed in verbose mode (#770) + 1.302096 2017-09-10 21:16:18-07:00 America/Los_Angeles - -Fix to work with subref-in-stash optimisation (Father C.) + - Fix to work with subref-in-stash optimisation (Father C.) 1.302095 2017-08-31 20:35:22-07:00 America/Los_Angeles (TRIAL RELEASE) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/MANIFEST new/Test-Simple-1.302098/MANIFEST --- old/Test-Simple-1.302096/MANIFEST 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/MANIFEST 2017-10-03 15:13:51.000000000 +0200 @@ -120,6 +120,7 @@ t/Legacy/Regression/683_thread_todo.t t/Legacy/Regression/6_cmp_ok.t t/Legacy/Regression/736_use_ok.t +t/Legacy/Regression/789-read-only.t t/Legacy/Simple/load.t t/Legacy/Test2/Subtest.t t/Legacy/Tester/tbt_01basic.t @@ -318,6 +319,7 @@ t/regression/757-reset_in_subtest.t t/regression/buffered_subtest_plan_buffered.t t/regression/builder_does_not_init.t +t/regression/errors_facet.t t/regression/no_name_in_subtest.t t/zzz-check-breaks.t xt/author/pod-spell.t diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/META.json new/Test-Simple-1.302098/META.json --- old/Test-Simple-1.302096/META.json 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/META.json 2017-10-03 15:13:51.000000000 +0200 @@ -29,10 +29,9 @@ "requires" : { "File::Spec" : "0", "File::Temp" : "0", - "PerlIO" : "0", "Scalar::Util" : "1.13", "Storable" : "0", - "perl" : "5.008001", + "perl" : "5.006002", "utf8" : "0" } } @@ -47,7 +46,7 @@ "url" : "http://github.com/Test-More/test-more/" } }, - "version" : "1.302096", + "version" : "1.302098", "x_breaks" : { "Log::Dispatch::Config::TestLog" : "<= 0.02", "Net::BitTorrent" : "<= 0.052", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/META.yml new/Test-Simple-1.302098/META.yml --- old/Test-Simple-1.302096/META.yml 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/META.yml 2017-10-03 15:13:51.000000000 +0200 @@ -15,15 +15,14 @@ requires: File::Spec: '0' File::Temp: '0' - PerlIO: '0' Scalar::Util: '1.13' Storable: '0' - perl: '5.008001' + perl: '5.006002' utf8: '0' resources: bugtracker: http://github.com/Test-More/test-more/issues repository: http://github.com/Test-More/test-more/ -version: '1.302096' +version: '1.302098' x_breaks: Log::Dispatch::Config::TestLog: '<= 0.02' Net::BitTorrent: '<= 0.052' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/Makefile.PL new/Test-Simple-1.302098/Makefile.PL --- old/Test-Simple-1.302096/Makefile.PL 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/Makefile.PL 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -use 5.008001; +use 5.006002; use ExtUtils::MakeMaker; @@ -14,17 +14,16 @@ }, "DISTNAME" => "Test-Simple", "LICENSE" => "perl", - "MIN_PERL_VERSION" => "5.008001", + "MIN_PERL_VERSION" => "5.006002", "NAME" => "Test::Simple", "PREREQ_PM" => { "File::Spec" => 0, "File::Temp" => 0, - "PerlIO" => 0, "Scalar::Util" => "1.13", "Storable" => 0, "utf8" => 0 }, - "VERSION" => "1.302096", + "VERSION" => "1.302098", "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/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" } @@ -34,7 +33,6 @@ my %FallbackPrereqs = ( "File::Spec" => 0, "File::Temp" => 0, - "PerlIO" => 0, "Scalar::Util" => "1.13", "Storable" => 0, "utf8" => 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/cpanfile new/Test-Simple-1.302098/cpanfile --- old/Test-Simple-1.302096/cpanfile 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/cpanfile 2017-10-03 15:13:51.000000000 +0200 @@ -1,9 +1,8 @@ requires "File::Spec" => "0"; requires "File::Temp" => "0"; -requires "PerlIO" => "0"; requires "Scalar::Util" => "1.13"; requires "Storable" => "0"; -requires "perl" => "5.008001"; +requires "perl" => "5.006002"; requires "utf8" => "0"; on 'configure' => sub { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/dist.ini new/Test-Simple-1.302098/dist.ini --- old/Test-Simple-1.302096/dist.ini 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/dist.ini 2017-10-03 15:13:51.000000000 +0200 @@ -26,11 +26,10 @@ repository.type = git [Prereqs] -perl = 5.008001 +perl = 5.006002 utf8 = 0 File::Spec = 0 File::Temp = 0 -PerlIO = 0 Scalar::Util = 1.13 Storable = 0 ; Carp = 0 ; Do not uncomment this, causes cycle in really old perls (#682) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test/Builder/Formatter.pm new/Test-Simple-1.302098/lib/Test/Builder/Formatter.pm --- old/Test-Simple-1.302096/lib/Test/Builder/Formatter.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test/Builder/Formatter.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; BEGIN { require Test2::Formatter::TAP; our @ISA = qw(Test2::Formatter::TAP) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test/Builder/IO/Scalar.pm new/Test-Simple-1.302098/lib/Test/Builder/IO/Scalar.pm --- old/Test-Simple-1.302096/lib/Test/Builder/IO/Scalar.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test/Builder/IO/Scalar.pm 2017-10-03 15:13:51.000000000 +0200 @@ -562,6 +562,7 @@ sub SEEK { shift->seek(@_); } sub TELL { shift->tell(@_); } sub EOF { shift->eof(@_); } +sub FILENO { -1 } #------------------------------------------------------------ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test/Builder/Module.pm new/Test-Simple-1.302098/lib/Test/Builder/Module.pm --- old/Test-Simple-1.302096/lib/Test/Builder/Module.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test/Builder/Module.pm 2017-10-03 15:13:51.000000000 +0200 @@ -7,7 +7,7 @@ require Exporter; our @ISA = qw(Exporter); -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; =head1 NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test/Builder/Tester/Color.pm new/Test-Simple-1.302098/lib/Test/Builder/Tester/Color.pm --- old/Test-Simple-1.302096/lib/Test/Builder/Tester/Color.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test/Builder/Tester/Color.pm 2017-10-03 15:13:51.000000000 +0200 @@ -1,7 +1,7 @@ package Test::Builder::Tester::Color; use strict; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; require Test::Builder::Tester; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test/Builder/Tester.pm new/Test-Simple-1.302098/lib/Test/Builder/Tester.pm --- old/Test-Simple-1.302096/lib/Test/Builder/Tester.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test/Builder/Tester.pm 2017-10-03 15:13:51.000000000 +0200 @@ -1,7 +1,7 @@ package Test::Builder::Tester; use strict; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; use Test::Builder; use Symbol; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test/Builder/TodoDiag.pm new/Test-Simple-1.302098/lib/Test/Builder/TodoDiag.pm --- old/Test-Simple-1.302096/lib/Test/Builder/TodoDiag.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test/Builder/TodoDiag.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; BEGIN { require Test2::Event::Diag; our @ISA = qw(Test2::Event::Diag) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test/Builder.pm new/Test-Simple-1.302098/lib/Test/Builder.pm --- old/Test-Simple-1.302096/lib/Test/Builder.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test/Builder.pm 2017-10-03 15:13:51.000000000 +0200 @@ -4,7 +4,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; BEGIN { if( $] < 5.008 ) { @@ -336,7 +336,7 @@ } } - if ($start_pid != $$ && !$INC{'Test/Sync/IPC.pm'}) { + if ($start_pid != $$ && !$INC{'Test2/IPC.pm'}) { warn $ok ? "Forked inside subtest, but subtest never finished!\n" : $err; exit 255; } @@ -1439,7 +1439,7 @@ my $ctx = $self->ctx; my $data = $ctx->hub->meta(__PACKAGE__, {})->{Test_Results}; $ctx->release; - return map { $_->{'ok'} } @$data; + return map { $_ ? $_->{'ok'} : () } @$data; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test/More.pm new/Test-Simple-1.302098/lib/Test/More.pm --- old/Test-Simple-1.302096/lib/Test/More.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test/More.pm 2017-10-03 15:13:51.000000000 +0200 @@ -17,7 +17,7 @@ return warn @_, " at $file line $line\n"; } -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; use Test::Builder::Module; our @ISA = qw(Test::Builder::Module); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test/Simple.pm new/Test-Simple-1.302098/lib/Test/Simple.pm --- old/Test-Simple-1.302096/lib/Test/Simple.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test/Simple.pm 2017-10-03 15:13:51.000000000 +0200 @@ -4,7 +4,7 @@ use strict; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; use Test::Builder::Module; our @ISA = qw(Test::Builder::Module); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test/Tester/Capture.pm new/Test-Simple-1.302098/lib/Test/Tester/Capture.pm --- old/Test-Simple-1.302096/lib/Test/Tester/Capture.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test/Tester/Capture.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ package Test::Tester::Capture; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; use Test::Builder; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test/Tester/CaptureRunner.pm new/Test-Simple-1.302098/lib/Test/Tester/CaptureRunner.pm --- old/Test-Simple-1.302096/lib/Test/Tester/CaptureRunner.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test/Tester/CaptureRunner.pm 2017-10-03 15:13:51.000000000 +0200 @@ -3,7 +3,7 @@ package Test::Tester::CaptureRunner; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; use Test::Tester::Capture; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test/Tester/Delegate.pm new/Test-Simple-1.302098/lib/Test/Tester/Delegate.pm --- old/Test-Simple-1.302096/lib/Test/Tester/Delegate.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test/Tester/Delegate.pm 2017-10-03 15:13:51.000000000 +0200 @@ -3,7 +3,7 @@ package Test::Tester::Delegate; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; use Scalar::Util(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test/Tester.pm new/Test-Simple-1.302098/lib/Test/Tester.pm --- old/Test-Simple-1.302096/lib/Test/Tester.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test/Tester.pm 2017-10-03 15:13:51.000000000 +0200 @@ -18,7 +18,7 @@ use vars qw( @ISA @EXPORT ); -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; @EXPORT = qw( run_tests check_tests check_test cmp_results show_space ); @ISA = qw( Exporter ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test/use/ok.pm new/Test-Simple-1.302098/lib/Test/use/ok.pm --- old/Test-Simple-1.302096/lib/Test/use/ok.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test/use/ok.pm 2017-10-03 15:13:51.000000000 +0200 @@ -1,7 +1,7 @@ package Test::use::ok; use 5.005; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; __END__ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/API/Breakage.pm new/Test-Simple-1.302098/lib/Test2/API/Breakage.pm --- old/Test-Simple-1.302096/lib/Test2/API/Breakage.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/API/Breakage.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; use Test2::Util qw/pkg_to_file/; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/API/Context.pm new/Test-Simple-1.302098/lib/Test2/API/Context.pm --- old/Test-Simple-1.302096/lib/Test2/API/Context.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/API/Context.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,10 +2,10 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; -use Carp qw/confess croak longmess/; +use Carp qw/confess croak/; use Scalar::Util qw/weaken blessed/; use Test2::Util qw/get_tid try pkg_to_file get_tid/; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/API/Instance.pm new/Test-Simple-1.302098/lib/Test2/API/Instance.pm --- old/Test-Simple-1.302096/lib/Test2/API/Instance.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/API/Instance.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; our @CARP_NOT = qw/Test2::API Test2::API::Instance Test2::IPC::Driver Test2::Formatter/; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/API/Stack.pm new/Test-Simple-1.302098/lib/Test2/API/Stack.pm --- old/Test-Simple-1.302096/lib/Test2/API/Stack.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/API/Stack.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; use Test2::Hub(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/API.pm new/Test-Simple-1.302098/lib/Test2/API.pm --- old/Test-Simple-1.302096/lib/Test2/API.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/API.pm 2017-10-03 15:13:51.000000000 +0200 @@ -9,7 +9,7 @@ $ENV{TEST2_ACTIVE} = 1; } -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; my $INST; @@ -68,7 +68,7 @@ use Test2::Event::Skip(); use Test2::Event::Subtest(); -use Carp qw/carp croak confess longmess/; +use Carp qw/carp croak confess/; use Scalar::Util qw/blessed weaken/; use Test2::Util qw/get_tid clone_io pkg_to_file/; @@ -267,7 +267,7 @@ sub context { # We need to grab these before anything else to ensure they are not # changed. - my ($errno, $eval_error, $child_error) = (0 + $!, $@, $?); + my ($errno, $eval_error, $child_error, $extended_error) = (0 + $!, $@, $?, $^E); my %params = (level => 0, wrapped => 0, @_); @@ -309,7 +309,7 @@ } # I know this is ugly.... - ($!, $@, $?) = ($errno, $eval_error, $child_error) and return bless( + ($!, $@, $?, $^E) = ($errno, $eval_error, $child_error, $extended_error) and return bless( { %$current, _is_canon => undef, @@ -378,7 +378,7 @@ $params{on_init}->($current) if $params{on_init}; - ($!, $@, $?) = ($errno, $eval_error, $child_error); + ($!, $@, $?, $^E) = ($errno, $eval_error, $child_error, $extended_error); return $current; } @@ -406,7 +406,8 @@ my $oldframe = $ctx->{trace}->frame; my $olddepth = $ctx->{_depth}; - my $mess = longmess(); + # Older versions of Carp do not export longmess() function, so it needs to be called with package name + my $mess = Carp::longmess(); warn <<" EOT"; $msg @@ -524,7 +525,6 @@ my $stack = $ctx->stack || $STACK; my $hub = $stack->new_hub( class => 'Test2::Hub::Subtest', - buffered => $buffered, %$params, buffered => $buffered, ); @@ -1213,6 +1213,23 @@ processes and threads are finished before exiting. You will almost never want to turn this off. +=item $fh = test2_stdout() + +=item $fh = test2_stderr() + +These functions return the filehandles that test output should be written to. +They are primarily useful when writing a custom formatter and code that turns +events into actual output (TAP, etc.) They will return a dupe of the original +filehandles that formatted output can be sent to regardless of whatever state +the currently running test may have left STDOUT and STDERR in. + +=item test2_reset_io() + +Re-dupe the internal filehandles returned by C<test2_stdout()> and +C<test2_stderr()> from the current STDOUT and STDERR. You shouldn't need to do +this except in very peculiar situations (for example, you're testing a new +formatter and you need control over where the formatter is sending its output.) + =back =head2 BEHAVIOR HOOKS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/Event/Bail.pm new/Test-Simple-1.302098/lib/Test2/Event/Bail.pm --- old/Test-Simple-1.302096/lib/Test2/Event/Bail.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/Event/Bail.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/Event/Diag.pm new/Test-Simple-1.302098/lib/Test2/Event/Diag.pm --- old/Test-Simple-1.302096/lib/Test2/Event/Diag.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/Event/Diag.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/Event/Encoding.pm new/Test-Simple-1.302098/lib/Test2/Event/Encoding.pm --- old/Test-Simple-1.302096/lib/Test2/Event/Encoding.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/Event/Encoding.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; use Carp qw/croak/; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/Event/Exception.pm new/Test-Simple-1.302098/lib/Test2/Event/Exception.pm --- old/Test-Simple-1.302096/lib/Test2/Event/Exception.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/Event/Exception.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,12 +2,17 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) } use Test2::Util::HashBase qw{error}; +sub init { + my $self = shift; + $self->{+ERROR} = "$self->{+ERROR}"; +} + sub causes_fail { 1 } sub summary { @@ -71,6 +76,10 @@ =back +=head1 CAVEATS + +Be aware that all exceptions are stringified during construction. + =head1 SOURCE The source code repository for Test2 can be found at diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/Event/Fail.pm new/Test-Simple-1.302098/lib/Test2/Event/Fail.pm --- old/Test-Simple-1.302096/lib/Test2/Event/Fail.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/Event/Fail.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; use Test2::EventFacet::Info; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/Event/Generic.pm new/Test-Simple-1.302098/lib/Test2/Event/Generic.pm --- old/Test-Simple-1.302096/lib/Test2/Event/Generic.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/Event/Generic.pm 2017-10-03 15:13:51.000000000 +0200 @@ -5,7 +5,7 @@ use Carp qw/croak/; use Scalar::Util qw/reftype/; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) } use Test2::Util::HashBase; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/Event/Note.pm new/Test-Simple-1.302098/lib/Test2/Event/Note.pm --- old/Test-Simple-1.302096/lib/Test2/Event/Note.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/Event/Note.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/Event/Ok.pm new/Test-Simple-1.302098/lib/Test2/Event/Ok.pm --- old/Test-Simple-1.302096/lib/Test2/Event/Ok.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/Event/Ok.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/Event/Pass.pm new/Test-Simple-1.302098/lib/Test2/Event/Pass.pm --- old/Test-Simple-1.302096/lib/Test2/Event/Pass.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/Event/Pass.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; use Test2::EventFacet::Info; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/Event/Plan.pm new/Test-Simple-1.302098/lib/Test2/Event/Plan.pm --- old/Test-Simple-1.302096/lib/Test2/Event/Plan.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/Event/Plan.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/Event/Skip.pm new/Test-Simple-1.302098/lib/Test2/Event/Skip.pm --- old/Test-Simple-1.302096/lib/Test2/Event/Skip.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/Event/Skip.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; BEGIN { require Test2::Event::Ok; our @ISA = qw(Test2::Event::Ok) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/Event/Subtest.pm new/Test-Simple-1.302098/lib/Test2/Event/Subtest.pm --- old/Test-Simple-1.302096/lib/Test2/Event/Subtest.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/Event/Subtest.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; BEGIN { require Test2::Event::Ok; our @ISA = qw(Test2::Event::Ok) } use Test2::Util::HashBase qw{subevents buffered subtest_id}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/Event/TAP/Version.pm new/Test-Simple-1.302098/lib/Test2/Event/TAP/Version.pm --- old/Test-Simple-1.302096/lib/Test2/Event/TAP/Version.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/Event/TAP/Version.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; use Carp qw/croak/; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/Event/Waiting.pm new/Test-Simple-1.302098/lib/Test2/Event/Waiting.pm --- old/Test-Simple-1.302096/lib/Test2/Event/Waiting.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/Event/Waiting.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/Event.pm new/Test-Simple-1.302098/lib/Test2/Event.pm --- old/Test-Simple-1.302096/lib/Test2/Event.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/Event.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; use Test2::Util::HashBase qw/trace -amnesty/; use Test2::Util::ExternalMeta qw/meta get_meta set_meta delete_meta/; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/EventFacet/About.pm new/Test-Simple-1.302098/lib/Test2/EventFacet/About.pm --- old/Test-Simple-1.302096/lib/Test2/EventFacet/About.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/EventFacet/About.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) } use Test2::Util::HashBase qw{ -package -no_display }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/EventFacet/Amnesty.pm new/Test-Simple-1.302098/lib/Test2/EventFacet/Amnesty.pm --- old/Test-Simple-1.302096/lib/Test2/EventFacet/Amnesty.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/EventFacet/Amnesty.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; sub is_list { 1 } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/EventFacet/Assert.pm new/Test-Simple-1.302098/lib/Test2/EventFacet/Assert.pm --- old/Test-Simple-1.302096/lib/Test2/EventFacet/Assert.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/EventFacet/Assert.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) } use Test2::Util::HashBase qw{ -pass -no_debug -number }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/EventFacet/Control.pm new/Test-Simple-1.302098/lib/Test2/EventFacet/Control.pm --- old/Test-Simple-1.302096/lib/Test2/EventFacet/Control.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/EventFacet/Control.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) } use Test2::Util::HashBase qw{ -global -terminate -halt -has_callback -encoding }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/EventFacet/Error.pm new/Test-Simple-1.302098/lib/Test2/EventFacet/Error.pm --- old/Test-Simple-1.302096/lib/Test2/EventFacet/Error.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/EventFacet/Error.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; sub facet_key { 'errors' } sub is_list { 1 } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/EventFacet/Info.pm new/Test-Simple-1.302098/lib/Test2/EventFacet/Info.pm --- old/Test-Simple-1.302096/lib/Test2/EventFacet/Info.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/EventFacet/Info.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; sub is_list { 1 } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/EventFacet/Meta.pm new/Test-Simple-1.302098/lib/Test2/EventFacet/Meta.pm --- old/Test-Simple-1.302096/lib/Test2/EventFacet/Meta.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/EventFacet/Meta.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) } use vars qw/$AUTOLOAD/; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/EventFacet/Parent.pm new/Test-Simple-1.302098/lib/Test2/EventFacet/Parent.pm --- old/Test-Simple-1.302096/lib/Test2/EventFacet/Parent.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/EventFacet/Parent.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; use Carp qw/confess/; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/EventFacet/Plan.pm new/Test-Simple-1.302098/lib/Test2/EventFacet/Plan.pm --- old/Test-Simple-1.302096/lib/Test2/EventFacet/Plan.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/EventFacet/Plan.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) } use Test2::Util::HashBase qw{ -count -skip -none }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/EventFacet/Trace.pm new/Test-Simple-1.302098/lib/Test2/EventFacet/Trace.pm --- old/Test-Simple-1.302096/lib/Test2/EventFacet/Trace.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/EventFacet/Trace.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/EventFacet.pm new/Test-Simple-1.302098/lib/Test2/EventFacet.pm --- old/Test-Simple-1.302096/lib/Test2/EventFacet.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/EventFacet.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; use Test2::Util::HashBase qw/-details/; use Carp qw/croak/; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/Formatter/TAP.pm new/Test-Simple-1.302098/lib/Test2/Formatter/TAP.pm --- old/Test-Simple-1.302096/lib/Test2/Formatter/TAP.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/Formatter/TAP.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; use Test2::Util qw/clone_io/; @@ -53,7 +53,7 @@ sub encoding { my $self = shift; - if (@_) { + if ($] ge "5.007003" and @_) { my ($enc) = @_; my $handles = $self->{+HANDLES}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/Formatter.pm new/Test-Simple-1.302098/lib/Test2/Formatter.pm --- old/Test-Simple-1.302096/lib/Test2/Formatter.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/Formatter.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; my %ADDED; @@ -72,7 +72,7 @@ The C<write> method is a method, so it either gets a class or instance. The two arguments are the C<$event> object it should record, and the C<$assert_num> which is the number of the current assertion (ok), or the last assertion if -this even is not itself an assertion. The assertion number may be any integer 0 +this event is not itself an assertion. The assertion number may be any integer 0 or greater, and may be undefined in some cases. The C<hide_buffered()> method must return a boolean. This is used to tell diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/Hub/Interceptor/Terminator.pm new/Test-Simple-1.302098/lib/Test2/Hub/Interceptor/Terminator.pm --- old/Test-Simple-1.302096/lib/Test2/Hub/Interceptor/Terminator.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/Hub/Interceptor/Terminator.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/Hub/Interceptor.pm new/Test-Simple-1.302098/lib/Test2/Hub/Interceptor.pm --- old/Test-Simple-1.302096/lib/Test2/Hub/Interceptor.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/Hub/Interceptor.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; use Test2::Hub::Interceptor::Terminator(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/Hub/Subtest.pm new/Test-Simple-1.302098/lib/Test2/Hub/Subtest.pm --- old/Test-Simple-1.302096/lib/Test2/Hub/Subtest.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/Hub/Subtest.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; BEGIN { require Test2::Hub; our @ISA = qw(Test2::Hub) } use Test2::Util::HashBase qw/nested exit_code manual_skip_all/; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/Hub.pm new/Test-Simple-1.302098/lib/Test2/Hub.pm --- old/Test-Simple-1.302096/lib/Test2/Hub.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/Hub.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; use Carp qw/carp croak confess/; @@ -320,7 +320,7 @@ my $fail = 0; $fail = 1 if $f->{assert} && !$f->{assert}->{pass}; - $fail = 1 if $f->{error} && $f->{error}->{fail}; + $fail = 1 if $f->{errors} && grep { $_->{fail} } @{$f->{errors}}; $fail = 0 if $f->{amnesty}; $self->{+COUNT}++ if $f->{assert}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/IPC/Driver/Files.pm new/Test-Simple-1.302098/lib/Test2/IPC/Driver/Files.pm --- old/Test-Simple-1.302096/lib/Test2/IPC/Driver/Files.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/IPC/Driver/Files.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; BEGIN { require Test2::IPC::Driver; our @ISA = qw(Test2::IPC::Driver) } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/IPC/Driver.pm new/Test-Simple-1.302098/lib/Test2/IPC/Driver.pm --- old/Test-Simple-1.302096/lib/Test2/IPC/Driver.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/IPC/Driver.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,10 +2,10 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; -use Carp qw/confess longmess/; +use Carp qw/confess/; use Test2::Util::HashBase qw{no_fatal}; use Test2::API qw/test2_ipc_add_driver/; @@ -45,7 +45,8 @@ sub abort_trace { my $self = shift; my ($msg) = @_; - $self->abort(longmess($msg)); + # Older versions of Carp do not export longmess() function, so it needs to be called with package name + $self->abort(Carp::longmess($msg)); } 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/IPC.pm new/Test-Simple-1.302098/lib/Test2/IPC.pm --- old/Test-Simple-1.302096/lib/Test2/IPC.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/IPC.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; use Test2::API::Instance; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/Tools/Tiny.pm new/Test-Simple-1.302098/lib/Test2/Tools/Tiny.pm --- old/Test-Simple-1.302096/lib/Test2/Tools/Tiny.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/Tools/Tiny.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,6 +2,12 @@ use strict; use warnings; +BEGIN { + if ($] lt "5.008") { + require Test::Builder::IO::Scalar; + } +} + use Scalar::Util qw/blessed/; use Test2::Util qw/try/; @@ -10,7 +16,7 @@ use Test2::Hub::Interceptor(); use Test2::Hub::Interceptor::Terminator(); -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; BEGIN { require Exporter; our @ISA = qw(Exporter) } our @EXPORT = qw{ @@ -253,8 +259,16 @@ my ($out_fh, $err_fh); ($ok, $e) = try { + # Scalar refs as filehandles were added in 5.8. + if ($] ge "5.008") { open($out_fh, '>', \$out) or die "Failed to open a temporary STDOUT: $!"; open($err_fh, '>', \$err) or die "Failed to open a temporary STDERR: $!"; + } + # Emulate scalar ref filehandles with a tie. + else { + $out_fh = Test::Builder::IO::Scalar->new(\$out) or die "Failed to open a temporary STDOUT"; + $err_fh = Test::Builder::IO::Scalar->new(\$err) or die "Failed to open a temporary STDERR"; + } test2_stack->top->format->set_handles([$out_fh, $err_fh, $out_fh]); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/Util/ExternalMeta.pm new/Test-Simple-1.302098/lib/Test2/Util/ExternalMeta.pm --- old/Test-Simple-1.302096/lib/Test2/Util/ExternalMeta.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/Util/ExternalMeta.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; use Carp qw/croak/; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/Util/Facets2Legacy.pm new/Test-Simple-1.302098/lib/Test2/Util/Facets2Legacy.pm --- old/Test-Simple-1.302096/lib/Test2/Util/Facets2Legacy.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/Util/Facets2Legacy.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; use Carp qw/croak confess/; use Scalar::Util qw/blessed/; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/Util/Trace.pm new/Test-Simple-1.302098/lib/Test2/Util/Trace.pm --- old/Test-Simple-1.302096/lib/Test2/Util/Trace.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/Util/Trace.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ require Test2::EventFacet::Trace; @ISA = ('Test2::EventFacet::Trace'); -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2/Util.pm new/Test-Simple-1.302098/lib/Test2/Util.pm --- old/Test-Simple-1.302096/lib/Test2/Util.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2/Util.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,12 +2,16 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; use POSIX(); use Config qw/%Config/; use Carp qw/croak/; -use PerlIO(); + +BEGIN { + local ($@, $!, $SIG{__DIE__}); + *HAVE_PERLIO = eval { require PerlIO; PerlIO->VERSION(1.02); } ? sub() { 1 } : sub() { 0 }; +} our @EXPORT_OK = qw{ try @@ -25,7 +29,6 @@ ipc_separator - clone_io do_rename do_unlink try_sig_mask @@ -175,14 +178,18 @@ sub clone_io { my ($fh) = @_; - my $fileno = fileno($fh) or croak "Could not get fileno for handle"; + my $fileno = fileno($fh); + + return $fh if !defined($fileno) || !length($fileno) || $fileno < 0; + + open(my $out, '>&' . $fileno) or die "Can't dup fileno $fileno: $!"; my %seen; - open(my $out, '>&', $fileno) or die "Can't dup fileno $fileno: $!"; - binmode($out, join(":", "", "raw", grep { !$PERLIO_SKIP{$_} and !$seen{$_}++ } PerlIO::get_layers(STDOUT))); + my @layers = HAVE_PERLIO ? grep { !$PERLIO_SKIP{$_} and !$seen{$_}++ } PerlIO::get_layers($fh) : (); + binmode($out, join(":", "", "raw", @layers)); my $old = select $fh; - my $af = $|; + my $af = $|; select $out; $| = $af; select $old; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/Test2.pm new/Test-Simple-1.302098/lib/Test2.pm --- old/Test-Simple-1.302096/lib/Test2.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/Test2.pm 2017-10-03 15:13:51.000000000 +0200 @@ -2,7 +2,7 @@ use strict; use warnings; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/lib/ok.pm new/Test-Simple-1.302098/lib/ok.pm --- old/Test-Simple-1.302096/lib/ok.pm 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/lib/ok.pm 2017-10-03 15:13:51.000000000 +0200 @@ -1,5 +1,5 @@ package ok; -our $VERSION = '1.302096'; +our $VERSION = '1.302098'; use strict; use Test::More (); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/t/00-report.t new/Test-Simple-1.302098/t/00-report.t --- old/Test-Simple-1.302096/t/00-report.t 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/t/00-report.t 2017-10-03 15:13:51.000000000 +0200 @@ -13,8 +13,8 @@ print STDOUT "ok 1\n"; print STDOUT "1..1\n"; - open($stdout, '>&', *STDOUT) or die "Could not clone STDOUT: $!"; - open($stderr, '>&', *STDERR) or die "Could not clone STDERR: $!"; + open($stdout, '>&STDOUT') or die "Could not clone STDOUT: $!"; + open($stderr, '>&STDERR') or die "Could not clone STDERR: $!"; close(STDOUT) or die "Could not close STDOUT"; unless(close(STDERR)) { @@ -67,7 +67,7 @@ for my $dep (@depends) { my $l = length($dep); $len = $l if $l > $len; - $deps{$dep} = eval "require $dep; $dep->VERSION" || "N/A"; + $deps{$dep} = eval "require $dep" ? ($dep->VERSION || '0') : 'N/A'; } diag sprintf("%-${len}s %s", $_, $deps{$_}) for @depends; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/t/HashBase.t new/Test-Simple-1.302098/t/HashBase.t --- old/Test-Simple-1.302096/t/HashBase.t 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/t/HashBase.t 2017-10-03 15:13:51.000000000 +0200 @@ -83,7 +83,10 @@ *main::Const::Test::FOO = sub { 0 }; } ok(!$pkg->FOO, "overrode const sub"); +{ +local $TODO = "known to fail on $]" if $] le "5.006002"; is($pkg->do_it, 'const', "worked as expected, const was constant"); +} BEGIN { $INC{'Object/HashBase/Test/HBase/Wrapped.pm'} = __FILE__; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/t/Legacy/Regression/736_use_ok.t new/Test-Simple-1.302098/t/Legacy/Regression/736_use_ok.t --- old/Test-Simple-1.302096/t/Legacy/Regression/736_use_ok.t 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/t/Legacy/Regression/736_use_ok.t 2017-10-03 15:13:51.000000000 +0200 @@ -18,13 +18,19 @@ return $warn || ""; } +{ +local $TODO = "known to fail on $]" if $] le "5.006002"; my $file = __FILE__; -my $line = __LINE__ + 2; +my $line = __LINE__ + 4; like( - capture { use_ok 'MyWarner' }, + capture { + local $TODO; # localize $TODO to clear previous assignment, as following use_ok test is expected to pass + use_ok 'MyWarner'; + }, qr/^Deprected! run for your lives! at \Q$file\E line $line/, "Got the warning" ); +} ok(!capture { no warnings 'deprecated'; use_ok 'MyWarner' }, "No warning"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/t/Legacy/Regression/789-read-only.t new/Test-Simple-1.302098/t/Legacy/Regression/789-read-only.t --- old/Test-Simple-1.302096/t/Legacy/Regression/789-read-only.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Test-Simple-1.302098/t/Legacy/Regression/789-read-only.t 2017-10-03 15:13:51.000000000 +0200 @@ -0,0 +1,37 @@ +use Test::More; +use strict; +use warnings; + +# See https://github.com/Test-More/test-more/issues/789 + +BEGIN { + plan skip_all => 'AUTHOR_TESTING not enabled' + unless $ENV{AUTHOR_TESTING}; + + plan skip_all => "This test requires Test::Class" + unless eval { require Test::Class; 1 }; + + plan skip_all => "This test requires Test::Script" + unless eval { require Test::Script; 1 }; +} + +package Test; + +use base 'Test::Class'; + +use Test::More; +use Test::Script; + +sub a_compilation_test : Test(startup => 1) { + script_compiles(__FILE__); +} + +sub test : Test(1) { + ok(1); +} + +package main; + +use Test::Class; + +Test::Class->runtests; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/t/Legacy/harness_active.t new/Test-Simple-1.302098/t/Legacy/harness_active.t --- old/Test-Simple-1.302096/t/Legacy/harness_active.t 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/t/Legacy/harness_active.t 2017-10-03 15:13:51.000000000 +0200 @@ -47,6 +47,7 @@ { local $ENV{HARNESS_ACTIVE} = 0; + local $ENV{HARNESS_IS_VERBOSE} = 0; #line 62 fail( "this fails" ); @@ -66,6 +67,7 @@ { local $ENV{HARNESS_ACTIVE} = 1; + local $ENV{HARNESS_IS_VERBOSE} = 0; #line 71 fail( "this fails" ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/t/Legacy/overload_threads.t new/Test-Simple-1.302098/t/Legacy/overload_threads.t --- old/Test-Simple-1.302096/t/Legacy/overload_threads.t 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/t/Legacy/overload_threads.t 2017-10-03 15:13:51.000000000 +0200 @@ -18,7 +18,11 @@ eval { require threads; 'threads'->import; 1; } if CAN_THREAD; } -use Test::More tests => 5; +use Test::More; + +plan skip_all => "known to crash on $]" if $] le "5.006002"; + +plan tests => 5; package Overloaded; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/t/Legacy/utf8.t new/Test-Simple-1.302098/t/Legacy/utf8.t --- old/Test-Simple-1.302096/t/Legacy/utf8.t 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/t/Legacy/utf8.t 2017-10-03 15:13:51.000000000 +0200 @@ -17,6 +17,7 @@ # All together so Test::More sees the open discipline $have_perlio = eval q[ require PerlIO; + PerlIO->VERSION(1.02); # required for PerlIO::get_layers binmode *STDOUT, ":encoding(utf8)"; binmode *STDERR, ":encoding(utf8)"; require Test::More; @@ -30,7 +31,7 @@ } if( !$have_perlio ) { - plan skip_all => "Don't have PerlIO"; + plan skip_all => "Don't have PerlIO 1.02"; } else { plan tests => 5; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/t/Legacy_And_Test2/preload_diag_note.t new/Test-Simple-1.302098/t/Legacy_And_Test2/preload_diag_note.t --- old/Test-Simple-1.302096/t/Legacy_And_Test2/preload_diag_note.t 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/t/Legacy_And_Test2/preload_diag_note.t 2017-10-03 15:13:51.000000000 +0200 @@ -1,6 +1,11 @@ use strict; use warnings; +if ($] lt "5.008") { + print "1..0 # SKIP Test cannot run on perls below 5.8.0\n"; + exit 0; +} + BEGIN { require Test2::API; Test2::API::test2_start_preload(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/t/Test2/behavior/init_croak.t new/Test-Simple-1.302098/t/Test2/behavior/init_croak.t --- old/Test-Simple-1.302096/t/Test2/behavior/init_croak.t 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/t/Test2/behavior/init_croak.t 2017-10-03 15:13:51.000000000 +0200 @@ -14,6 +14,8 @@ } } +skip_all("known to fail on $]") if $] le "5.006002"; + $@ = ""; my ($file, $line) = (__FILE__, __LINE__ + 1); eval { my $one = Foo::Bar->new }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/t/Test2/behavior/nested_context_exception.t new/Test-Simple-1.302098/t/Test2/behavior/nested_context_exception.t --- old/Test-Simple-1.302096/t/Test2/behavior/nested_context_exception.t 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/t/Test2/behavior/nested_context_exception.t 2017-10-03 15:13:51.000000000 +0200 @@ -5,6 +5,8 @@ use Test2::API qw/context/; +skip_all("known to fail on $]") if $] le "5.006002"; + sub outer { my $code = shift; my $ctx = context(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/t/Test2/modules/API/Instance.t new/Test-Simple-1.302098/t/Test2/modules/API/Instance.t --- old/Test-Simple-1.302096/t/Test2/modules/API/Instance.t 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/t/Test2/modules/API/Instance.t 2017-10-03 15:13:51.000000000 +0200 @@ -258,7 +258,8 @@ like($events[0]->message, qr/Test ended with extra hubs on the stack!/, "got diag"); } -{ +SKIP: { + last SKIP if $] lt "5.008"; $one->reset; my $stderr = ""; { @@ -286,7 +287,8 @@ EOT } -{ +SKIP: { + last SKIP if $] lt "5.008"; require Test2::API::Breakage; no warnings qw/redefine once/; my $ran = 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/t/Test2/modules/API.t new/Test-Simple-1.302098/t/Test2/modules/API.t --- old/Test-Simple-1.302096/t/Test2/modules/API.t 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/t/Test2/modules/API.t 2017-10-03 15:13:51.000000000 +0200 @@ -102,11 +102,18 @@ my $file = __FILE__; my $line = __LINE__ + 1; my $warnings = warnings { $CLASS->can('test2_ipc_add_driver')->('fake') }; +my $sub1 = sub { like( $warnings->[0], qr{^IPC driver fake loaded too late to be used as the global ipc driver at \Q$file\E line $line}, "got warning about adding driver too late" ); +}; +if ($] le "5.006002") { + todo("TODO known to fail on $]", $sub1); +} else { + $sub1->(); +} is_deeply([$CLASS->can('test2_ipc_drivers')->()], [qw/fake Test2::IPC::Driver::Files/], "Got updated list"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/t/Test2/modules/Event/Exception.t new/Test-Simple-1.302098/t/Test2/modules/Event/Exception.t --- old/Test-Simple-1.302096/t/Test2/modules/Event/Exception.t 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/t/Test2/modules/Event/Exception.t 2017-10-03 15:13:51.000000000 +0200 @@ -27,4 +27,29 @@ "Got error facet", ); +my $hash = {an => 'error'}; +my $str = "$hash"; + +$exception = Test2::Event::Exception->new( + trace => {frame => []}, + error => $hash, +); + +ok($exception->causes_fail, "Exception events always cause failure"); + +is($exception->error, $str, "Got stringified exception"); + +$facet_data = $exception->facet_data; +ok($facet_data->{about}, "Got common facet data"); + +is_deeply( + $facet_data->{errors}, + [{ + tag => 'ERROR', + fail => 1, + details => $str, + }], + "Got error facet", +); + done_testing; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/t/Test2/modules/Formatter/TAP.t new/Test-Simple-1.302098/t/Test2/modules/Formatter/TAP.t --- old/Test-Simple-1.302096/t/Test2/modules/Formatter/TAP.t 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/t/Test2/modules/Formatter/TAP.t 2017-10-03 15:13:51.000000000 +0200 @@ -20,7 +20,16 @@ use Test2::Tools::Tiny; use Test2::API qw/context/; -use PerlIO; + +BEGIN { + eval { + require PerlIO; + PerlIO->VERSION(1.02); # required for PerlIO::get_layers + } or do { + print "1..0 # SKIP Don't have PerlIO 1.02\n"; + exit 0; + } +} sub grabber { my ($std, $err); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/t/Test2/modules/IPC/Driver/Files.t new/Test-Simple-1.302098/t/Test2/modules/IPC/Driver/Files.t --- old/Test-Simple-1.302096/t/Test2/modules/IPC/Driver/Files.t 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/t/Test2/modules/IPC/Driver/Files.t 2017-10-03 15:13:51.000000000 +0200 @@ -6,6 +6,11 @@ use strict; use warnings; +if ($] lt "5.008") { + print "1..0 # SKIP Test cannot run on perls below 5.8.0\n"; + exit 0; +} + sub simple_capture(&) { my $code = shift; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/t/Test2/modules/IPC/Driver.t new/Test-Simple-1.302098/t/Test2/modules/IPC/Driver.t --- old/Test-Simple-1.302096/t/Test2/modules/IPC/Driver.t 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/t/Test2/modules/IPC/Driver.t 2017-10-03 15:13:51.000000000 +0200 @@ -25,6 +25,8 @@ ); } +SKIP: { + last SKIP if $] lt "5.008"; tests abort => sub { my $one = Test2::IPC::Driver->new(no_fatal => 1); my ($err, $out) = ("", ""); @@ -53,5 +55,6 @@ is($out, "not ok - IPC Fatal Error\n", "got 'not ok' on stdout"); like($err, qr/IPC Fatal Error: foo/, "Got error"); }; +} done_testing; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/t/Test2/modules/Util.t new/Test-Simple-1.302098/t/Test2/modules/Util.t --- old/Test-Simple-1.302096/t/Test2/modules/Util.t 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/t/Test2/modules/Util.t 2017-10-03 15:13:51.000000000 +0200 @@ -18,8 +18,16 @@ CAN_SIGSYS IS_WIN32 + + clone_io /; +BEGIN { + if ($] lt "5.008") { + require Test::Builder::IO::Scalar; + } +} + { for my $try (\&try, Test2::Util->can('_manual_try'), Test2::Util->can('_local_try')) { my ($ok, $err) = $try->(sub { die "xxx" }); @@ -58,4 +66,23 @@ ok(!$check_for_sig_sys->("FOO SYSX BAR"), "SYSX is not SYS"); ok(!$check_for_sig_sys->("FOO XSYS BAR"), "XSYS is not SYS"); +my $io = clone_io(\*STDOUT); +ok($io, "Cloned the filehandle"); +close($io); + +my $fh; +my $out = ''; +if ($] ge "5.008") { + open($fh, '>', \$out) or die "Could not open filehandle"; +} else { + $fh = Test::Builder::IO::Scalar->new(\$out) or die "Could not open filehandle"; +} + +$io = clone_io($fh); +is($io, $fh, "For a scalar handle we simply return the original handle, no other choice"); +print $io "Test\n"; + +is($out, "Test\n", "wrote to the scalar handle"); + + done_testing; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/t/Test2/regression/gh_16.t new/Test-Simple-1.302098/t/Test2/regression/gh_16.t --- old/Test-Simple-1.302096/t/Test2/regression/gh_16.t 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/t/Test2/regression/gh_16.t 2017-10-03 15:13:51.000000000 +0200 @@ -10,7 +10,7 @@ BEGIN { print "\n1..1\n"; close(STDERR); - open(STDERR, '>&', STDOUT); + open(STDERR, '>&STDOUT'); } use Test2::API; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/t/Test2/regression/ipc_files_abort_exit.t new/Test-Simple-1.302098/t/Test2/regression/ipc_files_abort_exit.t --- old/Test-Simple-1.302096/t/Test2/regression/ipc_files_abort_exit.t 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/t/Test2/regression/ipc_files_abort_exit.t 2017-10-03 15:13:51.000000000 +0200 @@ -7,6 +7,7 @@ BEGIN { skip_all "System cannot fork" unless CAN_FORK; + skip_all "known to fail on $]" if $] le "5.006002"; } plan(3); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/t/regression/errors_facet.t new/Test-Simple-1.302098/t/regression/errors_facet.t --- old/Test-Simple-1.302096/t/regression/errors_facet.t 1970-01-01 01:00:00.000000000 +0100 +++ new/Test-Simple-1.302098/t/regression/errors_facet.t 2017-10-03 15:13:51.000000000 +0200 @@ -0,0 +1,53 @@ +use Test2::Tools::Tiny; +use Test2::API qw/intercept context/; + +{ + $INC{'My/Event.pm'} = 1; + + package My::Event; + use base 'Test2::Event'; + + use Test2::Util::Facets2Legacy ':ALL'; + + sub facet_data { + my $self = shift; + + my $out = $self->common_facet_data; + + $out->{errors} = [{tag => 'OOPS', fail => !$ENV{FAILURE_DO_PASS}, details => "An error occured"}]; + + return $out; + } +} + +sub error { + my $ctx = context(); + my $e = $ctx->send_event('+My::Event'); + $ctx->release; + return $e; +} + +my $events = intercept { + tests foo => sub { + ok(1, "need at least 1 assertion"); + error(); + }; +}; + +ok(!$events->[0]->pass, "Subtest did not pass"); + +my ($passing_a, $passing_b); +intercept { + my $hub = Test2::API::test2_stack->top; + + $passing_a = $hub->is_passing; + + error(); + + $passing_b = $hub->is_passing; +}; + +ok($passing_a, "Passign before error"); +ok(!$passing_b, "Not passing after error"); + +done_testing; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Test-Simple-1.302096/xt/author/pod-spell.t new/Test-Simple-1.302098/xt/author/pod-spell.t --- old/Test-Simple-1.302096/xt/author/pod-spell.t 2017-09-11 06:16:19.000000000 +0200 +++ new/Test-Simple-1.302098/xt/author/pod-spell.t 2017-10-03 15:13:51.000000000 +0200 @@ -1,7 +1,15 @@ use strict; use warnings; -use Test::Spelling; +BEGIN { + eval { + require Test::Spelling; + } or do { + print "1..0 # SKIP Don't have Test::Spelling\n"; + exit 0; + }; + Test::Spelling->import; +} my @stopwords; for (<DATA>) {
