Skip to content

Commit

Permalink
Update Test-Simple to CPAN version 1.302181
Browse files Browse the repository at this point in the history
[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)
  • Loading branch information
toddr committed Sep 16, 2020
1 parent 544e145 commit 4946c6a
Show file tree
Hide file tree
Showing 85 changed files with 3,816 additions and 219 deletions.
10 changes: 10 additions & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -2255,6 +2255,11 @@ cpan/Test-Simple/lib/Test2/API.pm
cpan/Test-Simple/lib/Test2/API/Breakage.pm
cpan/Test-Simple/lib/Test2/API/Context.pm
cpan/Test-Simple/lib/Test2/API/Instance.pm
cpan/Test-Simple/lib/Test2/API/InterceptResult.pm
cpan/Test-Simple/lib/Test2/API/InterceptResult/Event.pm
cpan/Test-Simple/lib/Test2/API/InterceptResult/Facet.pm
cpan/Test-Simple/lib/Test2/API/InterceptResult/Hub.pm
cpan/Test-Simple/lib/Test2/API/InterceptResult/Squasher.pm
cpan/Test-Simple/lib/Test2/API/Stack.pm
cpan/Test-Simple/lib/Test2/Event.pm
cpan/Test-Simple/lib/Test2/Event/Bail.pm
Expand Down Expand Up @@ -2387,6 +2392,7 @@ cpan/Test-Simple/t/Legacy/Regression/683_thread_todo.t
cpan/Test-Simple/t/Legacy/Regression/6_cmp_ok.t
cpan/Test-Simple/t/Legacy/Regression/736_use_ok.t
cpan/Test-Simple/t/Legacy/Regression/789-read-only.t
cpan/Test-Simple/t/Legacy/Regression/870-experimental-warnings.t
cpan/Test-Simple/t/Legacy/require_ok.t
cpan/Test-Simple/t/Legacy/run_test.t
cpan/Test-Simple/t/Legacy/simple.t
Expand Down Expand Up @@ -2472,6 +2478,7 @@ cpan/Test-Simple/t/regression/721-nested-streamed-subtest.t
cpan/Test-Simple/t/regression/757-reset_in_subtest.t
cpan/Test-Simple/t/regression/812-todo.t
cpan/Test-Simple/t/regression/817-subtest-todo.t
cpan/Test-Simple/t/regression/862-intercept_tb_todo.t
cpan/Test-Simple/t/regression/buffered_subtest_plan_buffered.t
cpan/Test-Simple/t/regression/builder_does_not_init.t
cpan/Test-Simple/t/regression/errors_facet.t
Expand Down Expand Up @@ -2513,6 +2520,9 @@ cpan/Test-Simple/t/Test2/modules/API.t
cpan/Test-Simple/t/Test2/modules/API/Breakage.t
cpan/Test-Simple/t/Test2/modules/API/Context.t
cpan/Test-Simple/t/Test2/modules/API/Instance.t
cpan/Test-Simple/t/Test2/modules/API/InterceptResult.t
cpan/Test-Simple/t/Test2/modules/API/InterceptResult/Event.t
cpan/Test-Simple/t/Test2/modules/API/InterceptResult/Squasher.t
cpan/Test-Simple/t/Test2/modules/API/Stack.t
cpan/Test-Simple/t/Test2/modules/Event.t
cpan/Test-Simple/t/Test2/modules/Event/Bail.t
Expand Down
44 changes: 22 additions & 22 deletions Makefile.SH
Original file line number Diff line number Diff line change
Expand Up @@ -1439,28 +1439,28 @@ _cleaner2:
-rmdir lib/Test2/IPC/Driver lib/Test2/IPC lib/Test2/Hub/Interceptor
-rmdir lib/Test2/Hub lib/Test2/Formatter lib/Test2/EventFacet/Info
-rmdir lib/Test2/EventFacet lib/Test2/Event/TAP lib/Test2/Event
-rmdir lib/Test2/API lib/Test2 lib/Test/use lib/Test/Tester
-rmdir lib/Test/Builder/Tester lib/Test/Builder/IO lib/Test/Builder
-rmdir lib/Test lib/Term lib/TAP/Parser/YAMLish
-rmdir lib/TAP/Parser/SourceHandler lib/TAP/Parser/Scheduler
-rmdir lib/TAP/Parser/Result lib/TAP/Parser/Iterator lib/TAP/Parser
-rmdir lib/TAP/Harness lib/TAP/Formatter/File
-rmdir lib/TAP/Formatter/Console lib/TAP/Formatter lib/TAP
-rmdir lib/Sys/Syslog lib/Sys lib/Sub lib/Search lib/Scalar
-rmdir lib/Pod/Text lib/Pod/Simple lib/Pod/Perldoc lib/PerlIO/via
-rmdir lib/PerlIO lib/Perl lib/Parse/CPAN lib/Parse lib/Params
-rmdir lib/Net/FTP lib/Module/Load lib/Module/CoreList lib/Module
-rmdir lib/Memoize lib/Math/BigInt lib/Math/BigFloat lib/Math lib/MIME
-rmdir lib/Locale/Maketext lib/Locale lib/List/Util lib/List
-rmdir lib/JSON/PP lib/JSON lib/IPC lib/IO/Uncompress/Adapter
-rmdir lib/IO/Uncompress lib/IO/Socket lib/IO/Compress/Zlib
-rmdir lib/IO/Compress/Zip lib/IO/Compress/Gzip lib/IO/Compress/Base
-rmdir lib/IO/Compress/Adapter lib/IO/Compress lib/IO
-rmdir lib/I18N/LangTags lib/I18N lib/Hash/Util lib/Hash lib/HTTP
-rmdir lib/Filter/Util lib/Filter lib/File/Spec lib/ExtUtils/Typemaps
-rmdir lib/ExtUtils/ParseXS lib/ExtUtils/MakeMaker/version
-rmdir lib/ExtUtils/MakeMaker lib/ExtUtils/Liblist
-rmdir lib/ExtUtils/Constant lib/ExtUtils/Command
-rmdir lib/Test2/API/InterceptResult lib/Test2/API lib/Test2
-rmdir lib/Test/use lib/Test/Tester lib/Test/Builder/Tester
-rmdir lib/Test/Builder/IO lib/Test/Builder lib/Test lib/Term
-rmdir lib/TAP/Parser/YAMLish lib/TAP/Parser/SourceHandler
-rmdir lib/TAP/Parser/Scheduler lib/TAP/Parser/Result
-rmdir lib/TAP/Parser/Iterator lib/TAP/Parser lib/TAP/Harness
-rmdir lib/TAP/Formatter/File lib/TAP/Formatter/Console
-rmdir lib/TAP/Formatter lib/TAP lib/Sys/Syslog lib/Sys lib/Sub
-rmdir lib/Search lib/Scalar lib/Pod/Text lib/Pod/Simple
-rmdir lib/Pod/Perldoc lib/PerlIO/via lib/PerlIO lib/Perl
-rmdir lib/Parse/CPAN lib/Parse lib/Params lib/Net/FTP lib/Module/Load
-rmdir lib/Module/CoreList lib/Module lib/Memoize lib/Math/BigInt
-rmdir lib/Math/BigFloat lib/Math lib/MIME lib/Locale/Maketext
-rmdir lib/Locale lib/List/Util lib/List lib/JSON/PP lib/JSON lib/IPC
-rmdir lib/IO/Uncompress/Adapter lib/IO/Uncompress lib/IO/Socket
-rmdir lib/IO/Compress/Zlib lib/IO/Compress/Zip lib/IO/Compress/Gzip
-rmdir lib/IO/Compress/Base lib/IO/Compress/Adapter lib/IO/Compress
-rmdir lib/IO lib/I18N/LangTags lib/I18N lib/Hash/Util lib/Hash
-rmdir lib/HTTP lib/Filter/Util lib/Filter lib/File/Spec
-rmdir lib/ExtUtils/Typemaps lib/ExtUtils/ParseXS
-rmdir lib/ExtUtils/MakeMaker/version lib/ExtUtils/MakeMaker
-rmdir lib/ExtUtils/Liblist lib/ExtUtils/Constant lib/ExtUtils/Command
-rmdir lib/ExtUtils/CBuilder/Platform/Windows
-rmdir lib/ExtUtils/CBuilder/Platform lib/ExtUtils/CBuilder
-rmdir lib/Exporter lib/Encode/Unicode lib/Encode/MIME/Header
Expand Down
2 changes: 1 addition & 1 deletion Porting/Maintainers.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,7 @@ package Maintainers;
},

'Test::Simple' => {
'DISTRIBUTION' => 'EXODIST/Test-Simple-1.302175.tar.gz',
'DISTRIBUTION' => 'EXODIST/Test-Simple-1.302181.tar.gz',
'FILES' => q[cpan/Test-Simple],
'EXCLUDED' => [
qr{^examples/},
Expand Down
94 changes: 68 additions & 26 deletions cpan/Test-Simple/lib/Test/Builder.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use 5.006;
use strict;
use warnings;

our $VERSION = '1.302175';
our $VERSION = '1.302181';

BEGIN {
if( $] < 5.008 ) {
Expand Down Expand Up @@ -51,40 +51,80 @@ sub _add_ts_hooks {

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

$hub->pre_filter(sub {
my ($active_hub, $e) = @_;
$hub->pre_filter(
sub {
my ($active_hub, $e) = @_;

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

no strict 'refs';
no warnings 'once';
my $todo;
$todo = ${"$cpkg\::TODO"} if $cpkg;
$todo = ${"$epkg\::TODO"} if $epkg && !$todo;
no strict 'refs';
no warnings 'once';
my $todo;
$todo = ${"$cpkg\::TODO"} if $cpkg;
$todo = ${"$epkg\::TODO"} if $epkg && !$todo;

return $e unless defined($todo);
return $e unless length($todo);
return $e unless defined($todo);
return $e unless length($todo);

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

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

# Set todo on ok's
if ($e->isa('Test2::Event::Ok')) {
$e->set_effective_pass(1);
# Set todo on ok's
if ($e->isa('Test2::Event::Ok')) {
$e->set_effective_pass(1);

if (my $result = $e->get_meta(__PACKAGE__)) {
$result->{reason} ||= $todo;
$result->{type} ||= 'todo';
$result->{ok} = 1;
if (my $result = $e->get_meta(__PACKAGE__)) {
$result->{reason} ||= $todo;
$result->{type} ||= 'todo';
$result->{ok} = 1;
}
}
}

return $e;
}, inherit => 1);
return $e;
},

inherit => 1,

intercept_inherit => {
clean => sub {
my %params = @_;

my $state = $params{state};
my $trace = $params{trace};

my $epkg = $$epkgr;
my $cpkg = $trace->{frame}->[0];

no strict 'refs';
no warnings 'once';

$state->{+__PACKAGE__} = {};
$state->{+__PACKAGE__}->{"$cpkg\::TODO"} = ${"$cpkg\::TODO"} if $cpkg;
$state->{+__PACKAGE__}->{"$epkg\::TODO"} = ${"$epkg\::TODO"} if $epkg;

${"$cpkg\::TODO"} = undef if $cpkg;
${"$epkg\::TODO"} = undef if $epkg;
},
restore => sub {
my %params = @_;
my $state = $params{state};

no strict 'refs';
no warnings 'once';

for my $item (keys %{$state->{+__PACKAGE__}}) {
no strict 'refs';
no warnings 'once';

${"$item"} = $state->{+__PACKAGE__}->{$item};
}
},
},
);
}

{
Expand Down Expand Up @@ -922,9 +962,11 @@ sub cmp_ok {
local( $@, $!, $SIG{__DIE__} ); # isolate eval

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

# This is so that warnings come out at the caller's level
$succ = eval qq[
BEGIN {\${^WARNING_BITS} = \$warning_bits};
#line $line "(eval in cmp_ok) $file"
\$test = (\$got $type \$expect);
1;
Expand Down
4 changes: 2 additions & 2 deletions cpan/Test-Simple/lib/Test/Builder/Formatter.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package Test::Builder::Formatter;
use strict;
use warnings;

our $VERSION = '1.302175';
our $VERSION = '1.302181';

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

Expand Down Expand Up @@ -97,7 +97,7 @@ F<http://github.com/Test-More/test-more/>.
=head1 COPYRIGHT
Copyright 2019 Chad Granum E<lt>exodist@cpan.orgE<gt>.
Copyright 2020 Chad Granum E<lt>exodist@cpan.orgE<gt>.
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
Expand Down
2 changes: 1 addition & 1 deletion cpan/Test-Simple/lib/Test/Builder/Module.pm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use Test::Builder;
require Exporter;
our @ISA = qw(Exporter);

our $VERSION = '1.302175';
our $VERSION = '1.302181';


=head1 NAME
Expand Down
2 changes: 1 addition & 1 deletion cpan/Test-Simple/lib/Test/Builder/Tester.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package Test::Builder::Tester;

use strict;
our $VERSION = '1.302175';
our $VERSION = '1.302181';

use Test::Builder;
use Symbol;
Expand Down
2 changes: 1 addition & 1 deletion cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package Test::Builder::Tester::Color;

use strict;
our $VERSION = '1.302175';
our $VERSION = '1.302181';

require Test::Builder::Tester;

Expand Down
4 changes: 2 additions & 2 deletions cpan/Test-Simple/lib/Test/Builder/TodoDiag.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package Test::Builder::TodoDiag;
use strict;
use warnings;

our $VERSION = '1.302175';
our $VERSION = '1.302181';

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

Expand Down Expand Up @@ -58,7 +58,7 @@ F<http://github.com/Test-More/test-more/>.
=head1 COPYRIGHT
Copyright 2019 Chad Granum E<lt>exodist@cpan.orgE<gt>.
Copyright 2020 Chad Granum E<lt>exodist@cpan.orgE<gt>.
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
Expand Down
2 changes: 1 addition & 1 deletion cpan/Test-Simple/lib/Test/More.pm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ sub _carp {
return warn @_, " at $file line $line\n";
}

our $VERSION = '1.302175';
our $VERSION = '1.302181';

use Test::Builder::Module;
our @ISA = qw(Test::Builder::Module);
Expand Down
2 changes: 1 addition & 1 deletion cpan/Test-Simple/lib/Test/Simple.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use 5.006;

use strict;

our $VERSION = '1.302175';
our $VERSION = '1.302181';

use Test::Builder::Module;
our @ISA = qw(Test::Builder::Module);
Expand Down
2 changes: 1 addition & 1 deletion cpan/Test-Simple/lib/Test/Tester.pm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ require Exporter;

use vars qw( @ISA @EXPORT );

our $VERSION = '1.302175';
our $VERSION = '1.302181';

@EXPORT = qw( run_tests check_tests check_test cmp_results show_space );
@ISA = qw( Exporter );
Expand Down
2 changes: 1 addition & 1 deletion cpan/Test-Simple/lib/Test/Tester/Capture.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use strict;

package Test::Tester::Capture;

our $VERSION = '1.302175';
our $VERSION = '1.302181';


use Test::Builder;
Expand Down
2 changes: 1 addition & 1 deletion cpan/Test-Simple/lib/Test/Tester/CaptureRunner.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use strict;

package Test::Tester::CaptureRunner;

our $VERSION = '1.302175';
our $VERSION = '1.302181';


use Test::Tester::Capture;
Expand Down
2 changes: 1 addition & 1 deletion cpan/Test-Simple/lib/Test/Tester/Delegate.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use warnings;

package Test::Tester::Delegate;

our $VERSION = '1.302175';
our $VERSION = '1.302181';

use Scalar::Util();

Expand Down
2 changes: 1 addition & 1 deletion cpan/Test-Simple/lib/Test/use/ok.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package Test::use::ok;
use 5.005;

our $VERSION = '1.302175';
our $VERSION = '1.302181';


__END__
Expand Down
4 changes: 2 additions & 2 deletions cpan/Test-Simple/lib/Test2.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package Test2;
use strict;
use warnings;

our $VERSION = '1.302175';
our $VERSION = '1.302181';


1;
Expand Down Expand Up @@ -203,7 +203,7 @@ F<http://github.com/Test-More/test-more/>.
=head1 COPYRIGHT
Copyright 2019 Chad Granum E<lt>exodist@cpan.orgE<gt>.
Copyright 2020 Chad Granum E<lt>exodist@cpan.orgE<gt>.
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
Expand Down
Loading

0 comments on commit 4946c6a

Please sign in to comment.