Skip to content

Commit 4946c6a

Browse files
committed
Update Test-Simple to CPAN version 1.302181
[DELTA] 1.302181 2020-09-14 09:46:04-07:00 America/Los_Angeles - put try_sig_mask back where it goes (And add test to prevent this in the future) - Drop new List::Util requirement back down 1.302180 2020-09-13 23:11:18-07:00 America/Los_Angeles - No changes since last trial 1.302179 2020-09-12 22:35:19-07:00 America/Los_Angeles (TRIAL RELEASE) - Bump minimum List::Util version (for uniq) 1.302178 2020-09-07 14:11:52-07:00 America/Los_Angeles (TRIAL RELEASE) - Move try_sig_mask to the only module that uses it. - Inherit warnings bitmask in cmp_ok string eval - Update copyright date - Improved API for interept {} and what it returns 1.302177 2020-08-06 21:46:06-07:00 America/Los_Angeles - Minor fix to author downstream test - No significant changes since the last trial 1.302176 2020-08-05 21:45:19-07:00 America/Los_Angeles (TRIAL RELEASE) - Fix Test::More's $TODO inside intercept (Perl#862)
1 parent 544e145 commit 4946c6a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+3816
-219
lines changed

MANIFEST

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2255,6 +2255,11 @@ cpan/Test-Simple/lib/Test2/API.pm
22552255
cpan/Test-Simple/lib/Test2/API/Breakage.pm
22562256
cpan/Test-Simple/lib/Test2/API/Context.pm
22572257
cpan/Test-Simple/lib/Test2/API/Instance.pm
2258+
cpan/Test-Simple/lib/Test2/API/InterceptResult.pm
2259+
cpan/Test-Simple/lib/Test2/API/InterceptResult/Event.pm
2260+
cpan/Test-Simple/lib/Test2/API/InterceptResult/Facet.pm
2261+
cpan/Test-Simple/lib/Test2/API/InterceptResult/Hub.pm
2262+
cpan/Test-Simple/lib/Test2/API/InterceptResult/Squasher.pm
22582263
cpan/Test-Simple/lib/Test2/API/Stack.pm
22592264
cpan/Test-Simple/lib/Test2/Event.pm
22602265
cpan/Test-Simple/lib/Test2/Event/Bail.pm
@@ -2387,6 +2392,7 @@ cpan/Test-Simple/t/Legacy/Regression/683_thread_todo.t
23872392
cpan/Test-Simple/t/Legacy/Regression/6_cmp_ok.t
23882393
cpan/Test-Simple/t/Legacy/Regression/736_use_ok.t
23892394
cpan/Test-Simple/t/Legacy/Regression/789-read-only.t
2395+
cpan/Test-Simple/t/Legacy/Regression/870-experimental-warnings.t
23902396
cpan/Test-Simple/t/Legacy/require_ok.t
23912397
cpan/Test-Simple/t/Legacy/run_test.t
23922398
cpan/Test-Simple/t/Legacy/simple.t
@@ -2472,6 +2478,7 @@ cpan/Test-Simple/t/regression/721-nested-streamed-subtest.t
24722478
cpan/Test-Simple/t/regression/757-reset_in_subtest.t
24732479
cpan/Test-Simple/t/regression/812-todo.t
24742480
cpan/Test-Simple/t/regression/817-subtest-todo.t
2481+
cpan/Test-Simple/t/regression/862-intercept_tb_todo.t
24752482
cpan/Test-Simple/t/regression/buffered_subtest_plan_buffered.t
24762483
cpan/Test-Simple/t/regression/builder_does_not_init.t
24772484
cpan/Test-Simple/t/regression/errors_facet.t
@@ -2513,6 +2520,9 @@ cpan/Test-Simple/t/Test2/modules/API.t
25132520
cpan/Test-Simple/t/Test2/modules/API/Breakage.t
25142521
cpan/Test-Simple/t/Test2/modules/API/Context.t
25152522
cpan/Test-Simple/t/Test2/modules/API/Instance.t
2523+
cpan/Test-Simple/t/Test2/modules/API/InterceptResult.t
2524+
cpan/Test-Simple/t/Test2/modules/API/InterceptResult/Event.t
2525+
cpan/Test-Simple/t/Test2/modules/API/InterceptResult/Squasher.t
25162526
cpan/Test-Simple/t/Test2/modules/API/Stack.t
25172527
cpan/Test-Simple/t/Test2/modules/Event.t
25182528
cpan/Test-Simple/t/Test2/modules/Event/Bail.t

Makefile.SH

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,28 +1439,28 @@ _cleaner2:
14391439
-rmdir lib/Test2/IPC/Driver lib/Test2/IPC lib/Test2/Hub/Interceptor
14401440
-rmdir lib/Test2/Hub lib/Test2/Formatter lib/Test2/EventFacet/Info
14411441
-rmdir lib/Test2/EventFacet lib/Test2/Event/TAP lib/Test2/Event
1442-
-rmdir lib/Test2/API lib/Test2 lib/Test/use lib/Test/Tester
1443-
-rmdir lib/Test/Builder/Tester lib/Test/Builder/IO lib/Test/Builder
1444-
-rmdir lib/Test lib/Term lib/TAP/Parser/YAMLish
1445-
-rmdir lib/TAP/Parser/SourceHandler lib/TAP/Parser/Scheduler
1446-
-rmdir lib/TAP/Parser/Result lib/TAP/Parser/Iterator lib/TAP/Parser
1447-
-rmdir lib/TAP/Harness lib/TAP/Formatter/File
1448-
-rmdir lib/TAP/Formatter/Console lib/TAP/Formatter lib/TAP
1449-
-rmdir lib/Sys/Syslog lib/Sys lib/Sub lib/Search lib/Scalar
1450-
-rmdir lib/Pod/Text lib/Pod/Simple lib/Pod/Perldoc lib/PerlIO/via
1451-
-rmdir lib/PerlIO lib/Perl lib/Parse/CPAN lib/Parse lib/Params
1452-
-rmdir lib/Net/FTP lib/Module/Load lib/Module/CoreList lib/Module
1453-
-rmdir lib/Memoize lib/Math/BigInt lib/Math/BigFloat lib/Math lib/MIME
1454-
-rmdir lib/Locale/Maketext lib/Locale lib/List/Util lib/List
1455-
-rmdir lib/JSON/PP lib/JSON lib/IPC lib/IO/Uncompress/Adapter
1456-
-rmdir lib/IO/Uncompress lib/IO/Socket lib/IO/Compress/Zlib
1457-
-rmdir lib/IO/Compress/Zip lib/IO/Compress/Gzip lib/IO/Compress/Base
1458-
-rmdir lib/IO/Compress/Adapter lib/IO/Compress lib/IO
1459-
-rmdir lib/I18N/LangTags lib/I18N lib/Hash/Util lib/Hash lib/HTTP
1460-
-rmdir lib/Filter/Util lib/Filter lib/File/Spec lib/ExtUtils/Typemaps
1461-
-rmdir lib/ExtUtils/ParseXS lib/ExtUtils/MakeMaker/version
1462-
-rmdir lib/ExtUtils/MakeMaker lib/ExtUtils/Liblist
1463-
-rmdir lib/ExtUtils/Constant lib/ExtUtils/Command
1442+
-rmdir lib/Test2/API/InterceptResult lib/Test2/API lib/Test2
1443+
-rmdir lib/Test/use lib/Test/Tester lib/Test/Builder/Tester
1444+
-rmdir lib/Test/Builder/IO lib/Test/Builder lib/Test lib/Term
1445+
-rmdir lib/TAP/Parser/YAMLish lib/TAP/Parser/SourceHandler
1446+
-rmdir lib/TAP/Parser/Scheduler lib/TAP/Parser/Result
1447+
-rmdir lib/TAP/Parser/Iterator lib/TAP/Parser lib/TAP/Harness
1448+
-rmdir lib/TAP/Formatter/File lib/TAP/Formatter/Console
1449+
-rmdir lib/TAP/Formatter lib/TAP lib/Sys/Syslog lib/Sys lib/Sub
1450+
-rmdir lib/Search lib/Scalar lib/Pod/Text lib/Pod/Simple
1451+
-rmdir lib/Pod/Perldoc lib/PerlIO/via lib/PerlIO lib/Perl
1452+
-rmdir lib/Parse/CPAN lib/Parse lib/Params lib/Net/FTP lib/Module/Load
1453+
-rmdir lib/Module/CoreList lib/Module lib/Memoize lib/Math/BigInt
1454+
-rmdir lib/Math/BigFloat lib/Math lib/MIME lib/Locale/Maketext
1455+
-rmdir lib/Locale lib/List/Util lib/List lib/JSON/PP lib/JSON lib/IPC
1456+
-rmdir lib/IO/Uncompress/Adapter lib/IO/Uncompress lib/IO/Socket
1457+
-rmdir lib/IO/Compress/Zlib lib/IO/Compress/Zip lib/IO/Compress/Gzip
1458+
-rmdir lib/IO/Compress/Base lib/IO/Compress/Adapter lib/IO/Compress
1459+
-rmdir lib/IO lib/I18N/LangTags lib/I18N lib/Hash/Util lib/Hash
1460+
-rmdir lib/HTTP lib/Filter/Util lib/Filter lib/File/Spec
1461+
-rmdir lib/ExtUtils/Typemaps lib/ExtUtils/ParseXS
1462+
-rmdir lib/ExtUtils/MakeMaker/version lib/ExtUtils/MakeMaker
1463+
-rmdir lib/ExtUtils/Liblist lib/ExtUtils/Constant lib/ExtUtils/Command
14641464
-rmdir lib/ExtUtils/CBuilder/Platform/Windows
14651465
-rmdir lib/ExtUtils/CBuilder/Platform lib/ExtUtils/CBuilder
14661466
-rmdir lib/Exporter lib/Encode/Unicode lib/Encode/MIME/Header

Porting/Maintainers.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,7 @@ package Maintainers;
10781078
},
10791079

10801080
'Test::Simple' => {
1081-
'DISTRIBUTION' => 'EXODIST/Test-Simple-1.302175.tar.gz',
1081+
'DISTRIBUTION' => 'EXODIST/Test-Simple-1.302181.tar.gz',
10821082
'FILES' => q[cpan/Test-Simple],
10831083
'EXCLUDED' => [
10841084
qr{^examples/},

cpan/Test-Simple/lib/Test/Builder.pm

Lines changed: 68 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use 5.006;
44
use strict;
55
use warnings;
66

7-
our $VERSION = '1.302175';
7+
our $VERSION = '1.302181';
88

99
BEGIN {
1010
if( $] < 5.008 ) {
@@ -51,40 +51,80 @@ sub _add_ts_hooks {
5151

5252
#$hub->add_context_aquire(sub {$_[0]->{level} += $Level - 1});
5353

54-
$hub->pre_filter(sub {
55-
my ($active_hub, $e) = @_;
54+
$hub->pre_filter(
55+
sub {
56+
my ($active_hub, $e) = @_;
5657

57-
my $epkg = $$epkgr;
58-
my $cpkg = $e->{trace} ? $e->{trace}->{frame}->[0] : undef;
58+
my $epkg = $$epkgr;
59+
my $cpkg = $e->{trace} ? $e->{trace}->{frame}->[0] : undef;
5960

60-
no strict 'refs';
61-
no warnings 'once';
62-
my $todo;
63-
$todo = ${"$cpkg\::TODO"} if $cpkg;
64-
$todo = ${"$epkg\::TODO"} if $epkg && !$todo;
61+
no strict 'refs';
62+
no warnings 'once';
63+
my $todo;
64+
$todo = ${"$cpkg\::TODO"} if $cpkg;
65+
$todo = ${"$epkg\::TODO"} if $epkg && !$todo;
6566

66-
return $e unless defined($todo);
67-
return $e unless length($todo);
67+
return $e unless defined($todo);
68+
return $e unless length($todo);
6869

69-
# Turn a diag into a todo diag
70-
return Test::Builder::TodoDiag->new(%$e) if ref($e) eq 'Test2::Event::Diag';
70+
# Turn a diag into a todo diag
71+
return Test::Builder::TodoDiag->new(%$e) if ref($e) eq 'Test2::Event::Diag';
7172

72-
$e->set_todo($todo) if $e->can('set_todo');
73-
$e->add_amnesty({tag => 'TODO', details => $todo});
73+
$e->set_todo($todo) if $e->can('set_todo');
74+
$e->add_amnesty({tag => 'TODO', details => $todo});
7475

75-
# Set todo on ok's
76-
if ($e->isa('Test2::Event::Ok')) {
77-
$e->set_effective_pass(1);
76+
# Set todo on ok's
77+
if ($e->isa('Test2::Event::Ok')) {
78+
$e->set_effective_pass(1);
7879

79-
if (my $result = $e->get_meta(__PACKAGE__)) {
80-
$result->{reason} ||= $todo;
81-
$result->{type} ||= 'todo';
82-
$result->{ok} = 1;
80+
if (my $result = $e->get_meta(__PACKAGE__)) {
81+
$result->{reason} ||= $todo;
82+
$result->{type} ||= 'todo';
83+
$result->{ok} = 1;
84+
}
8385
}
84-
}
8586

86-
return $e;
87-
}, inherit => 1);
87+
return $e;
88+
},
89+
90+
inherit => 1,
91+
92+
intercept_inherit => {
93+
clean => sub {
94+
my %params = @_;
95+
96+
my $state = $params{state};
97+
my $trace = $params{trace};
98+
99+
my $epkg = $$epkgr;
100+
my $cpkg = $trace->{frame}->[0];
101+
102+
no strict 'refs';
103+
no warnings 'once';
104+
105+
$state->{+__PACKAGE__} = {};
106+
$state->{+__PACKAGE__}->{"$cpkg\::TODO"} = ${"$cpkg\::TODO"} if $cpkg;
107+
$state->{+__PACKAGE__}->{"$epkg\::TODO"} = ${"$epkg\::TODO"} if $epkg;
108+
109+
${"$cpkg\::TODO"} = undef if $cpkg;
110+
${"$epkg\::TODO"} = undef if $epkg;
111+
},
112+
restore => sub {
113+
my %params = @_;
114+
my $state = $params{state};
115+
116+
no strict 'refs';
117+
no warnings 'once';
118+
119+
for my $item (keys %{$state->{+__PACKAGE__}}) {
120+
no strict 'refs';
121+
no warnings 'once';
122+
123+
${"$item"} = $state->{+__PACKAGE__}->{$item};
124+
}
125+
},
126+
},
127+
);
88128
}
89129

90130
{
@@ -922,9 +962,11 @@ sub cmp_ok {
922962
local( $@, $!, $SIG{__DIE__} ); # isolate eval
923963

924964
my($pack, $file, $line) = $ctx->trace->call();
965+
my $warning_bits = $ctx->trace->warning_bits;
925966

926967
# This is so that warnings come out at the caller's level
927968
$succ = eval qq[
969+
BEGIN {\${^WARNING_BITS} = \$warning_bits};
928970
#line $line "(eval in cmp_ok) $file"
929971
\$test = (\$got $type \$expect);
930972
1;

cpan/Test-Simple/lib/Test/Builder/Formatter.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package Test::Builder::Formatter;
22
use strict;
33
use warnings;
44

5-
our $VERSION = '1.302175';
5+
our $VERSION = '1.302181';
66

77
BEGIN { require Test2::Formatter::TAP; our @ISA = qw(Test2::Formatter::TAP) }
88

@@ -97,7 +97,7 @@ F<http://github.com/Test-More/test-more/>.
9797
9898
=head1 COPYRIGHT
9999
100-
Copyright 2019 Chad Granum E<lt>[email protected]E<gt>.
100+
Copyright 2020 Chad Granum E<lt>[email protected]E<gt>.
101101
102102
This program is free software; you can redistribute it and/or
103103
modify it under the same terms as Perl itself.

cpan/Test-Simple/lib/Test/Builder/Module.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use Test::Builder;
77
require Exporter;
88
our @ISA = qw(Exporter);
99

10-
our $VERSION = '1.302175';
10+
our $VERSION = '1.302181';
1111

1212

1313
=head1 NAME

cpan/Test-Simple/lib/Test/Builder/Tester.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package Test::Builder::Tester;
22

33
use strict;
4-
our $VERSION = '1.302175';
4+
our $VERSION = '1.302181';
55

66
use Test::Builder;
77
use Symbol;

cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package Test::Builder::Tester::Color;
22

33
use strict;
4-
our $VERSION = '1.302175';
4+
our $VERSION = '1.302181';
55

66
require Test::Builder::Tester;
77

cpan/Test-Simple/lib/Test/Builder/TodoDiag.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package Test::Builder::TodoDiag;
22
use strict;
33
use warnings;
44

5-
our $VERSION = '1.302175';
5+
our $VERSION = '1.302181';
66

77
BEGIN { require Test2::Event::Diag; our @ISA = qw(Test2::Event::Diag) }
88

@@ -58,7 +58,7 @@ F<http://github.com/Test-More/test-more/>.
5858
5959
=head1 COPYRIGHT
6060
61-
Copyright 2019 Chad Granum E<lt>[email protected]E<gt>.
61+
Copyright 2020 Chad Granum E<lt>[email protected]E<gt>.
6262
6363
This program is free software; you can redistribute it and/or
6464
modify it under the same terms as Perl itself.

cpan/Test-Simple/lib/Test/More.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ sub _carp {
1717
return warn @_, " at $file line $line\n";
1818
}
1919

20-
our $VERSION = '1.302175';
20+
our $VERSION = '1.302181';
2121

2222
use Test::Builder::Module;
2323
our @ISA = qw(Test::Builder::Module);

cpan/Test-Simple/lib/Test/Simple.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use 5.006;
44

55
use strict;
66

7-
our $VERSION = '1.302175';
7+
our $VERSION = '1.302181';
88

99
use Test::Builder::Module;
1010
our @ISA = qw(Test::Builder::Module);

cpan/Test-Simple/lib/Test/Tester.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ require Exporter;
1818

1919
use vars qw( @ISA @EXPORT );
2020

21-
our $VERSION = '1.302175';
21+
our $VERSION = '1.302181';
2222

2323
@EXPORT = qw( run_tests check_tests check_test cmp_results show_space );
2424
@ISA = qw( Exporter );

cpan/Test-Simple/lib/Test/Tester/Capture.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use strict;
22

33
package Test::Tester::Capture;
44

5-
our $VERSION = '1.302175';
5+
our $VERSION = '1.302181';
66

77

88
use Test::Builder;

cpan/Test-Simple/lib/Test/Tester/CaptureRunner.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use strict;
33

44
package Test::Tester::CaptureRunner;
55

6-
our $VERSION = '1.302175';
6+
our $VERSION = '1.302181';
77

88

99
use Test::Tester::Capture;

cpan/Test-Simple/lib/Test/Tester/Delegate.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use warnings;
33

44
package Test::Tester::Delegate;
55

6-
our $VERSION = '1.302175';
6+
our $VERSION = '1.302181';
77

88
use Scalar::Util();
99

cpan/Test-Simple/lib/Test/use/ok.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package Test::use::ok;
22
use 5.005;
33

4-
our $VERSION = '1.302175';
4+
our $VERSION = '1.302181';
55

66

77
__END__

cpan/Test-Simple/lib/Test2.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package Test2;
22
use strict;
33
use warnings;
44

5-
our $VERSION = '1.302175';
5+
our $VERSION = '1.302181';
66

77

88
1;
@@ -203,7 +203,7 @@ F<http://github.com/Test-More/test-more/>.
203203
204204
=head1 COPYRIGHT
205205
206-
Copyright 2019 Chad Granum E<lt>[email protected]E<gt>.
206+
Copyright 2020 Chad Granum E<lt>[email protected]E<gt>.
207207
208208
This program is free software; you can redistribute it and/or
209209
modify it under the same terms as Perl itself.

0 commit comments

Comments
 (0)