summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Hay <steve.m.hay@googlemail.com>2016-06-28 14:01:47 +0100
committerSteve Hay <steve.m.hay@googlemail.com>2016-06-28 14:01:47 +0100
commit35014935159564940825397b43157b99208639f4 (patch)
treee143965f52f6303931fa5f628da0a8a96604a96b
parent4af080e17c75177da18080e5e66cbdb45c802731 (diff)
downloadperl-35014935159564940825397b43157b99208639f4.tar.gz
Upgrade Test::Simple from version 1.302026 to 1.302035
-rw-r--r--MANIFEST3
-rwxr-xr-xPorting/Maintainers.pl9
-rw-r--r--cpan/Test-Simple/lib/Test/Builder.pm15
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/Formatter.pm2
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/Module.pm2
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/Tester.pm2
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm2
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/TodoDiag.pm2
-rw-r--r--cpan/Test-Simple/lib/Test/More.pm17
-rw-r--r--cpan/Test-Simple/lib/Test/Simple.pm2
-rw-r--r--cpan/Test-Simple/lib/Test/Tester.pm2
-rw-r--r--cpan/Test-Simple/lib/Test/Tester/Capture.pm2
-rw-r--r--cpan/Test-Simple/lib/Test/Tester/CaptureRunner.pm2
-rw-r--r--cpan/Test-Simple/lib/Test/Tester/Delegate.pm2
-rw-r--r--cpan/Test-Simple/lib/Test/use/ok.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2/API.pm40
-rw-r--r--cpan/Test-Simple/lib/Test2/API/Breakage.pm3
-rw-r--r--cpan/Test-Simple/lib/Test2/API/Context.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2/API/Instance.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2/API/Stack.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2/Event.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2/Event/Bail.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2/Event/Diag.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2/Event/Exception.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2/Event/Generic.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2/Event/Note.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2/Event/Ok.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2/Event/Plan.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2/Event/Skip.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2/Event/Subtest.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2/Event/Waiting.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2/Formatter.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2/Formatter/TAP.pm4
-rw-r--r--cpan/Test-Simple/lib/Test2/Hub.pm6
-rw-r--r--cpan/Test-Simple/lib/Test2/Hub/Interceptor.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2/Hub/Interceptor/Terminator.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2/Hub/Subtest.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2/IPC.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2/IPC/Driver.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2/IPC/Driver/Files.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2/Transition.pod14
-rw-r--r--cpan/Test-Simple/lib/Test2/Util.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2/Util/ExternalMeta.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2/Util/HashBase.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2/Util/Trace.pm2
-rw-r--r--cpan/Test-Simple/lib/ok.pm2
-rw-r--r--cpan/Test-Simple/t/Legacy/Regression/683_thread_todo.t31
-rw-r--r--cpan/Test-Simple/t/Test2/behavior/run_subtest_inherit.t84
-rw-r--r--cpan/Test-Simple/t/regression/684-nested_todo_diag.t23
50 files changed, 255 insertions, 70 deletions
diff --git a/MANIFEST b/MANIFEST
index 42e85cfcc6..91e7d6e511 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -2647,6 +2647,7 @@ cpan/Test-Simple/t/Legacy/plan_no_plan.t
cpan/Test-Simple/t/Legacy/plan_shouldnt_import.t
cpan/Test-Simple/t/Legacy/plan_skip_all.t
cpan/Test-Simple/t/Legacy/Regression/637.t
+cpan/Test-Simple/t/Legacy/Regression/683_thread_todo.t
cpan/Test-Simple/t/Legacy/require_ok.t
cpan/Test-Simple/t/Legacy/run_test.t
cpan/Test-Simple/t/Legacy/simple.t
@@ -2718,6 +2719,7 @@ cpan/Test-Simple/t/lib/Test/Simple/sample_tests/two_fail.plx
cpan/Test-Simple/t/lib/TieOut.pm
cpan/Test-Simple/t/regression/642_persistent_end.t
cpan/Test-Simple/t/regression/662-tbt-no-plan.t
+cpan/Test-Simple/t/regression/684-nested_todo_diag.t
cpan/Test-Simple/t/regression/no_name_in_subtest.t
cpan/Test-Simple/t/Test2/acceptance/try_it_done_testing.t
cpan/Test-Simple/t/Test2/acceptance/try_it_fork.t
@@ -2730,6 +2732,7 @@ cpan/Test-Simple/t/Test2/behavior/err_var.t
cpan/Test-Simple/t/Test2/behavior/init_croak.t
cpan/Test-Simple/t/Test2/behavior/nested_context_exception.t
cpan/Test-Simple/t/Test2/behavior/no_load_api.t
+cpan/Test-Simple/t/Test2/behavior/run_subtest_inherit.t
cpan/Test-Simple/t/Test2/behavior/Subtest_buffer_formatter.t
cpan/Test-Simple/t/Test2/behavior/Subtest_events.t
cpan/Test-Simple/t/Test2/behavior/Taint.t
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index 0ebcab086c..41188e2aaf 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -1058,21 +1058,16 @@ use File::Glob qw(:case);
},
'Test::Simple' => {
- 'DISTRIBUTION' => 'EXODIST/Test-Simple-1.302026.tar.gz',
+ 'DISTRIBUTION' => 'EXODIST/Test-Simple-1.302035.tar.gz',
'FILES' => q[cpan/Test-Simple],
'EXCLUDED' => [
- qr{^t/xt},
qr{^xt},
- qw( .perlcriticrc
- .perltidyrc
- perltidyrc
- dist.ini
+ qw( perltidyrc
examples/indent.pl
examples/subtest.t
examples/tools.pl
examples/tools.t
t/00compile.t
- t/xxx-changes_updated.t
t/00-report.t
t/zzz-check-breaks.t
),
diff --git a/cpan/Test-Simple/lib/Test/Builder.pm b/cpan/Test-Simple/lib/Test/Builder.pm
index 6e0c88eddd..e04dd390cd 100644
--- a/cpan/Test-Simple/lib/Test/Builder.pm
+++ b/cpan/Test-Simple/lib/Test/Builder.pm
@@ -4,7 +4,7 @@ use 5.006;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
BEGIN {
if( $] < 5.008 ) {
@@ -51,7 +51,7 @@ sub _add_ts_hooks {
#$hub->add_context_aquire(sub {$_[0]->{level} += $Level - 1});
- $hub->filter(sub {
+ $hub->pre_filter(sub {
my ($active_hub, $e) = @_;
my $epkg = $$epkgr;
@@ -65,7 +65,6 @@ sub _add_ts_hooks {
return $e unless $todo;
-
# Turn a diag into a todo diag
return Test::Builder::TodoDiag->new(%$e) if ref($e) eq 'Test2::Event::Diag';
@@ -82,7 +81,7 @@ sub _add_ts_hooks {
}
return $e;
- });
+ }, inherit => 1);
}
sub new {
@@ -177,14 +176,14 @@ sub child {
class => 'Test2::Hub::Subtest',
);
- $hub->filter(sub {
+ $hub->pre_filter(sub {
my ($active_hub, $e) = @_;
# Turn a diag into a todo diag
return Test::Builder::TodoDiag->new(%$e) if ref($e) eq 'Test2::Event::Diag';
return $e;
- }) if $orig_TODO;
+ }, inherit => 1) if $orig_TODO;
$hub->listen(sub { push @$subevents => $_[1] });
@@ -1456,7 +1455,7 @@ sub todo_start {
my $ctx = $self->ctx;
my $hub = $ctx->hub;
- my $filter = $hub->filter(sub {
+ my $filter = $hub->pre_filter(sub {
my ($active_hub, $e) = @_;
# Turn a diag into a todo diag
@@ -1493,7 +1492,7 @@ sub todo_end {
$ctx->throw('todo_end() called without todo_start()') unless $set;
- $ctx->hub->unfilter($set->[0]);
+ $ctx->hub->pre_unfilter($set->[0]);
$ctx->release;
diff --git a/cpan/Test-Simple/lib/Test/Builder/Formatter.pm b/cpan/Test-Simple/lib/Test/Builder/Formatter.pm
index bfa429a0b3..9b70d5822b 100644
--- a/cpan/Test-Simple/lib/Test/Builder/Formatter.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/Formatter.pm
@@ -2,7 +2,7 @@ package Test::Builder::Formatter;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
BEGIN { require Test2::Formatter::TAP; our @ISA = qw(Test2::Formatter::TAP) }
diff --git a/cpan/Test-Simple/lib/Test/Builder/Module.pm b/cpan/Test-Simple/lib/Test/Builder/Module.pm
index fbdcdc28d6..72d7bea6a7 100644
--- a/cpan/Test-Simple/lib/Test/Builder/Module.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/Module.pm
@@ -7,7 +7,7 @@ use Test::Builder;
require Exporter;
our @ISA = qw(Exporter);
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
=head1 NAME
diff --git a/cpan/Test-Simple/lib/Test/Builder/Tester.pm b/cpan/Test-Simple/lib/Test/Builder/Tester.pm
index 3fcf6657e8..1d93568578 100644
--- a/cpan/Test-Simple/lib/Test/Builder/Tester.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/Tester.pm
@@ -1,7 +1,7 @@
package Test::Builder::Tester;
use strict;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
use Test::Builder;
use Symbol;
diff --git a/cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm b/cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm
index 8ed6c504b1..43d833c6c8 100644
--- a/cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm
@@ -1,7 +1,7 @@
package Test::Builder::Tester::Color;
use strict;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
require Test::Builder::Tester;
diff --git a/cpan/Test-Simple/lib/Test/Builder/TodoDiag.pm b/cpan/Test-Simple/lib/Test/Builder/TodoDiag.pm
index 379ec3b966..b319377f3f 100644
--- a/cpan/Test-Simple/lib/Test/Builder/TodoDiag.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/TodoDiag.pm
@@ -2,7 +2,7 @@ package Test::Builder::TodoDiag;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
BEGIN { require Test2::Event::Diag; our @ISA = qw(Test2::Event::Diag) }
diff --git a/cpan/Test-Simple/lib/Test/More.pm b/cpan/Test-Simple/lib/Test/More.pm
index 275de7adc3..e0c2f8446b 100644
--- a/cpan/Test-Simple/lib/Test/More.pm
+++ b/cpan/Test-Simple/lib/Test/More.pm
@@ -17,7 +17,7 @@ sub _carp {
return warn @_, " at $file line $line\n";
}
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
use Test::Builder::Module;
our @ISA = qw(Test::Builder::Module);
@@ -724,7 +724,7 @@ sub new_ok {
=item B<subtest>
- subtest $name => \&code;
+ subtest $name => \&code, @args;
C<subtest()> runs the &code as its own little test with its own plan and
its own result. The main test counts this as a single test using the
@@ -783,11 +783,20 @@ subtests are equivalent:
done_testing();
};
+Extra arguments given to C<subtest> are passed to the callback. For example:
+
+ sub my_subtest {
+ my $range = shift;
+ ...
+ }
+
+ for my $range (1, 10, 100, 1000) {
+ subtest "testing range $range", \&my_subtest, $range;
+ }
+
=cut
sub subtest {
- my ($name, $subtests) = @_;
-
my $tb = Test::More->builder;
return $tb->subtest(@_);
}
diff --git a/cpan/Test-Simple/lib/Test/Simple.pm b/cpan/Test-Simple/lib/Test/Simple.pm
index d42f4014c5..d0f9f06578 100644
--- a/cpan/Test-Simple/lib/Test/Simple.pm
+++ b/cpan/Test-Simple/lib/Test/Simple.pm
@@ -4,7 +4,7 @@ use 5.006;
use strict;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
use Test::Builder::Module;
our @ISA = qw(Test::Builder::Module);
diff --git a/cpan/Test-Simple/lib/Test/Tester.pm b/cpan/Test-Simple/lib/Test/Tester.pm
index 28a3acb7a6..88323f5079 100644
--- a/cpan/Test-Simple/lib/Test/Tester.pm
+++ b/cpan/Test-Simple/lib/Test/Tester.pm
@@ -18,7 +18,7 @@ require Exporter;
use vars qw( @ISA @EXPORT );
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
@EXPORT = qw( run_tests check_tests check_test cmp_results show_space );
@ISA = qw( Exporter );
diff --git a/cpan/Test-Simple/lib/Test/Tester/Capture.pm b/cpan/Test-Simple/lib/Test/Tester/Capture.pm
index d486dca373..3eb945f23f 100644
--- a/cpan/Test-Simple/lib/Test/Tester/Capture.pm
+++ b/cpan/Test-Simple/lib/Test/Tester/Capture.pm
@@ -2,7 +2,7 @@ use strict;
package Test::Tester::Capture;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
use Test::Builder;
diff --git a/cpan/Test-Simple/lib/Test/Tester/CaptureRunner.pm b/cpan/Test-Simple/lib/Test/Tester/CaptureRunner.pm
index 3b0d688443..03714fed76 100644
--- a/cpan/Test-Simple/lib/Test/Tester/CaptureRunner.pm
+++ b/cpan/Test-Simple/lib/Test/Tester/CaptureRunner.pm
@@ -3,7 +3,7 @@ use strict;
package Test::Tester::CaptureRunner;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
use Test::Tester::Capture;
diff --git a/cpan/Test-Simple/lib/Test/Tester/Delegate.pm b/cpan/Test-Simple/lib/Test/Tester/Delegate.pm
index 8b1f167d54..7659d6b4c6 100644
--- a/cpan/Test-Simple/lib/Test/Tester/Delegate.pm
+++ b/cpan/Test-Simple/lib/Test/Tester/Delegate.pm
@@ -3,7 +3,7 @@ use warnings;
package Test::Tester::Delegate;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
use vars '$AUTOLOAD';
diff --git a/cpan/Test-Simple/lib/Test/use/ok.pm b/cpan/Test-Simple/lib/Test/use/ok.pm
index 769b30f3d2..eca1f1cade 100644
--- a/cpan/Test-Simple/lib/Test/use/ok.pm
+++ b/cpan/Test-Simple/lib/Test/use/ok.pm
@@ -1,7 +1,7 @@
package Test::use::ok;
use 5.005;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
__END__
diff --git a/cpan/Test-Simple/lib/Test2.pm b/cpan/Test-Simple/lib/Test2.pm
index 3f4c8190de..0ec3ddb46d 100644
--- a/cpan/Test-Simple/lib/Test2.pm
+++ b/cpan/Test-Simple/lib/Test2.pm
@@ -2,7 +2,7 @@ package Test2;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
1;
diff --git a/cpan/Test-Simple/lib/Test2/API.pm b/cpan/Test-Simple/lib/Test2/API.pm
index 55e359ac42..27c17b3625 100644
--- a/cpan/Test-Simple/lib/Test2/API.pm
+++ b/cpan/Test-Simple/lib/Test2/API.pm
@@ -2,7 +2,7 @@ package Test2::API;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
my $INST;
@@ -416,8 +416,9 @@ sub intercept(&) {
sub run_subtest {
my ($name, $code, $params, @args) = @_;
- $params = { buffered => $params } unless ref $params;
- my $buffered = delete $params->{buffered};
+ $params = {buffered => $params} unless ref $params;
+ my $buffered = delete $params->{buffered};
+ my $inherit_trace = delete $params->{inherit_trace};
my $ctx = context();
@@ -442,6 +443,17 @@ sub run_subtest {
}
}
+ if ($inherit_trace) {
+ my $orig = $code;
+ $code = sub {
+ my $st_ctx = Test2::API::Context->new(
+ trace => $ctx->trace,
+ hub => $hub,
+ );
+ $st_ctx->do_in_context($orig, @args);
+ };
+ }
+
my ($ok, $err, $finished);
T2_SUBTEST_WRAPPER: {
# Do not use 'try' cause it localizes __DIE__
@@ -909,10 +921,26 @@ The code to run inside the subtest.
If this is a simple scalar then it will be treated as a boolean for the
'buffered' setting. If this is a hash reference then it will be used as a
parameters hash. The param hash will be used for hub construction (with the
-'buffered' key removed).
+specified keys removed).
+
+Keys that are removed and used by run_subtest:
+
+=over 4
-If this is true, or a hashref with a true value for the 'buffered' key, then
-the subtest will be buffered.
+=item 'buffered' => $bool
+
+Toggle buffered status.
+
+=item 'inherit_trace' => $bool
+
+Normally the subtest hub is pushed and the sub is allowed to generate its own
+root context for the hub. When this setting is turned on a root context will be
+created for the hub that shares the same trace as the current context.
+
+Set this to true if your tool is producing subtests without user-specified
+subs.
+
+=back
=item @ARGS
diff --git a/cpan/Test-Simple/lib/Test2/API/Breakage.pm b/cpan/Test-Simple/lib/Test2/API/Breakage.pm
index 7f99fa4569..75e9faae34 100644
--- a/cpan/Test-Simple/lib/Test2/API/Breakage.pm
+++ b/cpan/Test-Simple/lib/Test2/API/Breakage.pm
@@ -2,7 +2,7 @@ package Test2::API::Breakage;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
use Test2::Util qw/pkg_to_file/;
@@ -30,6 +30,7 @@ sub upgrade_required {
'Test::Modern' => '0.012',
'Test::SharedFork' => '0.34',
'Test::Alien' => '0.04',
+ 'Test::UseAllModules' => '0.14',
'Test::Clustericious::Cluster' => '0.30',
);
diff --git a/cpan/Test-Simple/lib/Test2/API/Context.pm b/cpan/Test-Simple/lib/Test2/API/Context.pm
index a7939e3a18..64bc2542fa 100644
--- a/cpan/Test-Simple/lib/Test2/API/Context.pm
+++ b/cpan/Test-Simple/lib/Test2/API/Context.pm
@@ -2,7 +2,7 @@ package Test2::API::Context;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
use Carp qw/confess croak longmess/;
diff --git a/cpan/Test-Simple/lib/Test2/API/Instance.pm b/cpan/Test-Simple/lib/Test2/API/Instance.pm
index 8938040e0b..ca50fb9a02 100644
--- a/cpan/Test-Simple/lib/Test2/API/Instance.pm
+++ b/cpan/Test-Simple/lib/Test2/API/Instance.pm
@@ -2,7 +2,7 @@ package Test2::API::Instance;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
our @CARP_NOT = qw/Test2::API Test2::API::Instance Test2::IPC::Driver Test2::Formatter/;
diff --git a/cpan/Test-Simple/lib/Test2/API/Stack.pm b/cpan/Test-Simple/lib/Test2/API/Stack.pm
index c6478d1ce8..e699f034df 100644
--- a/cpan/Test-Simple/lib/Test2/API/Stack.pm
+++ b/cpan/Test-Simple/lib/Test2/API/Stack.pm
@@ -2,7 +2,7 @@ package Test2::API::Stack;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
use Test2::Hub();
diff --git a/cpan/Test-Simple/lib/Test2/Event.pm b/cpan/Test-Simple/lib/Test2/Event.pm
index d350210298..db4f4df1bd 100644
--- a/cpan/Test-Simple/lib/Test2/Event.pm
+++ b/cpan/Test-Simple/lib/Test2/Event.pm
@@ -2,7 +2,7 @@ package Test2::Event;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
use Test2::Util::HashBase qw/trace nested in_subtest subtest_id/;
diff --git a/cpan/Test-Simple/lib/Test2/Event/Bail.pm b/cpan/Test-Simple/lib/Test2/Event/Bail.pm
index 4f8ae0fac8..47d05a132a 100644
--- a/cpan/Test-Simple/lib/Test2/Event/Bail.pm
+++ b/cpan/Test-Simple/lib/Test2/Event/Bail.pm
@@ -2,7 +2,7 @@ package Test2::Event::Bail;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
diff --git a/cpan/Test-Simple/lib/Test2/Event/Diag.pm b/cpan/Test-Simple/lib/Test2/Event/Diag.pm
index c50e9a9cd2..5b3f685ca7 100644
--- a/cpan/Test-Simple/lib/Test2/Event/Diag.pm
+++ b/cpan/Test-Simple/lib/Test2/Event/Diag.pm
@@ -2,7 +2,7 @@ package Test2::Event::Diag;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
diff --git a/cpan/Test-Simple/lib/Test2/Event/Exception.pm b/cpan/Test-Simple/lib/Test2/Event/Exception.pm
index 1280ada5b0..a5f30713ab 100644
--- a/cpan/Test-Simple/lib/Test2/Event/Exception.pm
+++ b/cpan/Test-Simple/lib/Test2/Event/Exception.pm
@@ -2,7 +2,7 @@ package Test2::Event::Exception;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
diff --git a/cpan/Test-Simple/lib/Test2/Event/Generic.pm b/cpan/Test-Simple/lib/Test2/Event/Generic.pm
index 92b04fb2d8..91cd9f3e8a 100644
--- a/cpan/Test-Simple/lib/Test2/Event/Generic.pm
+++ b/cpan/Test-Simple/lib/Test2/Event/Generic.pm
@@ -5,7 +5,7 @@ use warnings;
use Carp qw/croak/;
use Scalar::Util qw/reftype/;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
use Test2::Util::HashBase;
diff --git a/cpan/Test-Simple/lib/Test2/Event/Note.pm b/cpan/Test-Simple/lib/Test2/Event/Note.pm
index b35a29a787..a0395feee1 100644
--- a/cpan/Test-Simple/lib/Test2/Event/Note.pm
+++ b/cpan/Test-Simple/lib/Test2/Event/Note.pm
@@ -2,7 +2,7 @@ package Test2::Event::Note;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
diff --git a/cpan/Test-Simple/lib/Test2/Event/Ok.pm b/cpan/Test-Simple/lib/Test2/Event/Ok.pm
index a3ea2622c1..386a86be54 100644
--- a/cpan/Test-Simple/lib/Test2/Event/Ok.pm
+++ b/cpan/Test-Simple/lib/Test2/Event/Ok.pm
@@ -2,7 +2,7 @@ package Test2::Event::Ok;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
diff --git a/cpan/Test-Simple/lib/Test2/Event/Plan.pm b/cpan/Test-Simple/lib/Test2/Event/Plan.pm
index 599df6716f..a0bee2f98d 100644
--- a/cpan/Test-Simple/lib/Test2/Event/Plan.pm
+++ b/cpan/Test-Simple/lib/Test2/Event/Plan.pm
@@ -2,7 +2,7 @@ package Test2::Event::Plan;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
diff --git a/cpan/Test-Simple/lib/Test2/Event/Skip.pm b/cpan/Test-Simple/lib/Test2/Event/Skip.pm
index ef08022480..5b446ef965 100644
--- a/cpan/Test-Simple/lib/Test2/Event/Skip.pm
+++ b/cpan/Test-Simple/lib/Test2/Event/Skip.pm
@@ -2,7 +2,7 @@ package Test2::Event::Skip;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
BEGIN { require Test2::Event::Ok; our @ISA = qw(Test2::Event::Ok) }
diff --git a/cpan/Test-Simple/lib/Test2/Event/Subtest.pm b/cpan/Test-Simple/lib/Test2/Event/Subtest.pm
index 0d95424e36..49b827fa87 100644
--- a/cpan/Test-Simple/lib/Test2/Event/Subtest.pm
+++ b/cpan/Test-Simple/lib/Test2/Event/Subtest.pm
@@ -2,7 +2,7 @@ package Test2::Event::Subtest;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
BEGIN { require Test2::Event::Ok; our @ISA = qw(Test2::Event::Ok) }
diff --git a/cpan/Test-Simple/lib/Test2/Event/Waiting.pm b/cpan/Test-Simple/lib/Test2/Event/Waiting.pm
index 15d0b0a61b..ee526bbfd4 100644
--- a/cpan/Test-Simple/lib/Test2/Event/Waiting.pm
+++ b/cpan/Test-Simple/lib/Test2/Event/Waiting.pm
@@ -2,7 +2,7 @@ package Test2::Event::Waiting;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
diff --git a/cpan/Test-Simple/lib/Test2/Formatter.pm b/cpan/Test-Simple/lib/Test2/Formatter.pm
index 7e1313ace4..c4b0682f8b 100644
--- a/cpan/Test-Simple/lib/Test2/Formatter.pm
+++ b/cpan/Test-Simple/lib/Test2/Formatter.pm
@@ -2,7 +2,7 @@ package Test2::Formatter;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
my %ADDED;
diff --git a/cpan/Test-Simple/lib/Test2/Formatter/TAP.pm b/cpan/Test-Simple/lib/Test2/Formatter/TAP.pm
index 20086e17d5..900dae0d16 100644
--- a/cpan/Test-Simple/lib/Test2/Formatter/TAP.pm
+++ b/cpan/Test-Simple/lib/Test2/Formatter/TAP.pm
@@ -2,7 +2,7 @@ package Test2::Formatter::TAP;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
use Test2::Util::HashBase qw{
@@ -381,7 +381,7 @@ order to do this you use the C<register_event()> class method.
use Test2::Formatter::TAP;
use base 'Test2::Event';
- use Test2::Util::HashBase accessors => [qw/pass name diag note/];
+ use Test2::Util::HashBase qw/pass name diag note/;
Test2::Formatter::TAP->register_event(
__PACKAGE__,
diff --git a/cpan/Test-Simple/lib/Test2/Hub.pm b/cpan/Test-Simple/lib/Test2/Hub.pm
index 0b0d33bcfe..40b6c193cf 100644
--- a/cpan/Test-Simple/lib/Test2/Hub.pm
+++ b/cpan/Test-Simple/lib/Test2/Hub.pm
@@ -2,7 +2,7 @@ package Test2::Hub;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
use Carp qw/carp croak confess/;
@@ -83,6 +83,10 @@ sub inherit {
push @{$self->{+_LISTENERS}} => grep { $_->{inherit} } @$ls;
}
+ if (my $pfs = $from->{+_PRE_FILTERS}) {
+ push @{$self->{+_PRE_FILTERS}} => grep { $_->{inherit} } @$pfs;
+ }
+
if (my $fs = $from->{+_FILTERS}) {
push @{$self->{+_FILTERS}} => grep { $_->{inherit} } @$fs;
}
diff --git a/cpan/Test-Simple/lib/Test2/Hub/Interceptor.pm b/cpan/Test-Simple/lib/Test2/Hub/Interceptor.pm
index 006e3b6fc4..1b223dd5c4 100644
--- a/cpan/Test-Simple/lib/Test2/Hub/Interceptor.pm
+++ b/cpan/Test-Simple/lib/Test2/Hub/Interceptor.pm
@@ -2,7 +2,7 @@ package Test2::Hub::Interceptor;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
use Test2::Hub::Interceptor::Terminator();
diff --git a/cpan/Test-Simple/lib/Test2/Hub/Interceptor/Terminator.pm b/cpan/Test-Simple/lib/Test2/Hub/Interceptor/Terminator.pm
index 98a1209792..44a220aea7 100644
--- a/cpan/Test-Simple/lib/Test2/Hub/Interceptor/Terminator.pm
+++ b/cpan/Test-Simple/lib/Test2/Hub/Interceptor/Terminator.pm
@@ -2,7 +2,7 @@ package Test2::Hub::Interceptor::Terminator;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
1;
diff --git a/cpan/Test-Simple/lib/Test2/Hub/Subtest.pm b/cpan/Test-Simple/lib/Test2/Hub/Subtest.pm
index 4e3a8bc4ba..a11fc91f9a 100644
--- a/cpan/Test-Simple/lib/Test2/Hub/Subtest.pm
+++ b/cpan/Test-Simple/lib/Test2/Hub/Subtest.pm
@@ -2,7 +2,7 @@ package Test2::Hub::Subtest;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
BEGIN { require Test2::Hub; our @ISA = qw(Test2::Hub) }
diff --git a/cpan/Test-Simple/lib/Test2/IPC.pm b/cpan/Test-Simple/lib/Test2/IPC.pm
index d2626d98ab..01d3cd87df 100644
--- a/cpan/Test-Simple/lib/Test2/IPC.pm
+++ b/cpan/Test-Simple/lib/Test2/IPC.pm
@@ -2,7 +2,7 @@ package Test2::IPC;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
use Test2::API::Instance;
diff --git a/cpan/Test-Simple/lib/Test2/IPC/Driver.pm b/cpan/Test-Simple/lib/Test2/IPC/Driver.pm
index 4c29e42d35..5878d75184 100644
--- a/cpan/Test-Simple/lib/Test2/IPC/Driver.pm
+++ b/cpan/Test-Simple/lib/Test2/IPC/Driver.pm
@@ -2,7 +2,7 @@ package Test2::IPC::Driver;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
use Carp qw/confess longmess/;
diff --git a/cpan/Test-Simple/lib/Test2/IPC/Driver/Files.pm b/cpan/Test-Simple/lib/Test2/IPC/Driver/Files.pm
index 53530d7ef5..acf0342dee 100644
--- a/cpan/Test-Simple/lib/Test2/IPC/Driver/Files.pm
+++ b/cpan/Test-Simple/lib/Test2/IPC/Driver/Files.pm
@@ -2,7 +2,7 @@ package Test2::IPC::Driver::Files;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
BEGIN { require Test2::IPC::Driver; our @ISA = qw(Test2::IPC::Driver) }
diff --git a/cpan/Test-Simple/lib/Test2/Transition.pod b/cpan/Test-Simple/lib/Test2/Transition.pod
index a14f22e713..95f9d77e9b 100644
--- a/cpan/Test-Simple/lib/Test2/Transition.pod
+++ b/cpan/Test-Simple/lib/Test2/Transition.pod
@@ -248,6 +248,14 @@ tool.
Fixed in version: 0.012
+=item Test::UseAllModules
+
+Version 0.14 relied on C<< Test::Builder->history >> which was available in
+Test::Builder 1.5. Versions 0.12 and 0.13 relied on other Test::Builder
+internals.
+
+Fixed in version: 0.15
+
=back
=head2 STILL BROKEN
@@ -258,14 +266,14 @@ Fixed in version: 0.012
This distribution directly accesses the hash keys in the L<Test::Builder>
singleton. It also approaches the problem from the wrong angle, please consider
-using L<Test2::Harness> (not yet released) or L<App::ForkProve> which both
-solve the same problem at the harness level.
+using L<Test2::Harness> or L<App::ForkProve> which both solve the same problem
+at the harness level.
Still broken as of version: 0.373
=item Test::Wrapper
-This module directly uses hash keys in the L<Test::BuildeR> singleton. This
+This module directly uses hash keys in the L<Test::Builder> singleton. This
module is also obsolete thanks to the benefits of L<Test2>. Use C<intercept()>
from L<Test2::API> to achieve a similar result.
diff --git a/cpan/Test-Simple/lib/Test2/Util.pm b/cpan/Test-Simple/lib/Test2/Util.pm
index a903b6c310..b991727236 100644
--- a/cpan/Test-Simple/lib/Test2/Util.pm
+++ b/cpan/Test-Simple/lib/Test2/Util.pm
@@ -2,7 +2,7 @@ package Test2::Util;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
use Config qw/%Config/;
diff --git a/cpan/Test-Simple/lib/Test2/Util/ExternalMeta.pm b/cpan/Test-Simple/lib/Test2/Util/ExternalMeta.pm
index 1083ace2a5..c55196f0ce 100644
--- a/cpan/Test-Simple/lib/Test2/Util/ExternalMeta.pm
+++ b/cpan/Test-Simple/lib/Test2/Util/ExternalMeta.pm
@@ -2,7 +2,7 @@ package Test2::Util::ExternalMeta;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
use Carp qw/croak/;
diff --git a/cpan/Test-Simple/lib/Test2/Util/HashBase.pm b/cpan/Test-Simple/lib/Test2/Util/HashBase.pm
index d3583a4738..be76393026 100644
--- a/cpan/Test-Simple/lib/Test2/Util/HashBase.pm
+++ b/cpan/Test-Simple/lib/Test2/Util/HashBase.pm
@@ -2,7 +2,7 @@ package Test2::Util::HashBase;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
require Carp;
diff --git a/cpan/Test-Simple/lib/Test2/Util/Trace.pm b/cpan/Test-Simple/lib/Test2/Util/Trace.pm
index 5afeccf06e..c5c7bec1ce 100644
--- a/cpan/Test-Simple/lib/Test2/Util/Trace.pm
+++ b/cpan/Test-Simple/lib/Test2/Util/Trace.pm
@@ -2,7 +2,7 @@ package Test2::Util::Trace;
use strict;
use warnings;
-our $VERSION = '1.302026';
+our $VERSION = '1.302035';
use Test2::Util qw/get_tid/;
diff --git a/cpan/Test-Simple/lib/ok.pm b/cpan/Test-Simple/lib/ok.pm
index 8670163a7f..d05feaf360 100644
--- a/cpan/Test-Simple/lib/ok.pm
+++ b/cpan/Test-Simple/lib/ok.pm
@@ -1,5 +1,5 @@
package ok;
-$ok::VERSION = '1.302026';
+$ok::VERSION = '1.302035';
use strict;
use Test::More ();
diff --git a/cpan/Test-Simple/t/Legacy/Regression/683_thread_todo.t b/cpan/Test-Simple/t/Legacy/Regression/683_thread_todo.t
new file mode 100644
index 0000000000..c5eb7cb629
--- /dev/null
+++ b/cpan/Test-Simple/t/Legacy/Regression/683_thread_todo.t
@@ -0,0 +1,31 @@
+use strict;
+use warnings;
+
+use Test2::Util qw/CAN_THREAD/;
+BEGIN {
+ unless(CAN_THREAD) {
+ require Test::More;
+ Test::More->import(skip_all => "threads are not supported");
+ }
+}
+
+use threads;
+use Test::More;
+
+my $t = threads->create(
+ sub {
+ local $TODO = "Some good reason";
+
+ fail "Crap";
+
+ 42;
+ }
+);
+
+is(
+ $t->join,
+ 42,
+ "Thread exitted successfully"
+);
+
+done_testing;
diff --git a/cpan/Test-Simple/t/Test2/behavior/run_subtest_inherit.t b/cpan/Test-Simple/t/Test2/behavior/run_subtest_inherit.t
new file mode 100644
index 0000000000..3f15bc82a9
--- /dev/null
+++ b/cpan/Test-Simple/t/Test2/behavior/run_subtest_inherit.t
@@ -0,0 +1,84 @@
+use strict;
+use warnings;
+
+BEGIN { require "t/tools.pl" };
+
+use Test2::API qw/run_subtest intercept context/;
+
+# Test a subtest that should inherit the trace from the tool that calls it
+my ($file, $line) = (__FILE__, __LINE__ + 1);
+my $events = intercept { my_tool_inherit() };
+
+is(@$events, 1, "got 1 event");
+my $e = shift @$events;
+ok($e->isa('Test2::Event::Subtest'), "got a subtest event");
+is($e->trace->file, $file, "subtest is at correct file");
+is($e->trace->line, $line, "subtest is at correct line");
+my $plan = pop @{$e->subevents};
+ok($plan->isa('Test2::Event::Plan'), "Removed plan");
+for my $se (@{$e->subevents}) {
+ is($se->trace->file, $file, "subtest event ($se->{name}) is at correct file");
+ is($se->trace->line, $line, "subtest event ($se->{name}) is at correct line");
+ ok($se->pass, "subtest event ($se->{name}) passed");
+}
+
+
+
+
+# Test a subtest that should NOT inherit the trace from the tool that calls it
+($file, $line) = (__FILE__, __LINE__ + 1);
+$events = intercept { my_tool_no_inherit() };
+
+is(@$events, 1, "got 1 event");
+$e = shift @$events;
+ok($e->isa('Test2::Event::Subtest'), "got a subtest event");
+is($e->trace->file, $file, "subtest is at correct file");
+is($e->trace->line, $line, "subtest is at correct line");
+$plan = pop @{$e->subevents};
+ok($plan->isa('Test2::Event::Plan'), "Removed plan");
+for my $se (@{$e->subevents}) {
+ ok($se->trace->file ne $file, "subtest event ($se->{name}) is not in our file");
+ ok($se->trace->line ne $line, "subtest event ($se->{name}) is not on our line");
+ ok($se->pass, "subtest event ($se->{name}) passed");
+}
+
+done_testing;
+
+# Make these tools appear to be in a different file/line
+#line 100 'fake.pm'
+
+sub my_tool_inherit {
+ my $ctx = context();
+
+ run_subtest(
+ 'foo',
+ sub {
+ ok(1, 'a');
+ ok(2, 'b');
+ is_deeply(\@_, [qw/arg1 arg2/], "got args");
+ },
+ {buffered => 1, inherit_trace => 1},
+ 'arg1', 'arg2'
+ );
+
+ $ctx->release;
+}
+
+sub my_tool_no_inherit {
+ my $ctx = context();
+
+ run_subtest(
+ 'foo',
+ sub {
+ ok(1, 'a');
+ ok(2, 'b');
+ is_deeply(\@_, [qw/arg1 arg2/], "got args");
+ },
+ {buffered => 1, inherit_trace => 0},
+ 'arg1', 'arg2'
+ );
+
+ $ctx->release;
+}
+
+
diff --git a/cpan/Test-Simple/t/regression/684-nested_todo_diag.t b/cpan/Test-Simple/t/regression/684-nested_todo_diag.t
new file mode 100644
index 0000000000..cccd27e879
--- /dev/null
+++ b/cpan/Test-Simple/t/regression/684-nested_todo_diag.t
@@ -0,0 +1,23 @@
+use Test::More;
+use strict;
+use warnings;
+
+use Test2::API qw/intercept/;
+my @events;
+
+intercept {
+ local $TODO = "broken";
+
+ Test2::API::test2_stack->top->listen(sub { push @events => $_[1] }, inherit => 1);
+
+ subtest foo => sub {
+ subtest bar => sub {
+ ok(0, 'oops');
+ };
+ };
+};
+
+my ($event) = grep { $_->trace->line == 16 && ref($_) eq 'Test::Builder::TodoDiag'} @events;
+ok($event, "nested todo diag on line 16 was changed to TodoDiag (STDOUT instead of STDERR)");
+
+done_testing;