Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[patch] upgrade Test-Simple in perl blead #15386

Closed
p5pRT opened this issue Jun 7, 2016 · 5 comments
Closed

[patch] upgrade Test-Simple in perl blead #15386

p5pRT opened this issue Jun 7, 2016 · 5 comments

Comments

@p5pRT
Copy link

p5pRT commented Jun 7, 2016

Migrated from rt.perl.org#128337 (status was 'resolved')

Searchable as RT128337$

@p5pRT
Copy link
Author

p5pRT commented Jun 7, 2016

From @exodist

The attached patch will upgrade Test-Simple to 1.302026 in perl blead.

This fixes the SHM leak issues.

This patch also adjusts Porting/Maintainers.pl

-Chad

@p5pRT
Copy link
Author

p5pRT commented Jun 7, 2016

From @exodist

0001-Update-to-Test-Simple-1.302026.patch
From 8dbc9d9e26444d5b743386a8c83b22b7ba648956 Mon Sep 17 00:00:00 2001
From: Chad Granum <exodist7@gmail.com>
Date: Tue, 7 Jun 2016 08:04:02 -0700
Subject: [PATCH] Update to Test-Simple 1.302026

    - Fix SHM leak
    - Update Porting/Maintainers.pl
---
 MANIFEST                                           |   3 +-
 Porting/Maintainers.pl                             |  10 +-
 cpan/Test-Simple/lib/Test/Builder.pm               |   2 +-
 cpan/Test-Simple/lib/Test/Builder/Formatter.pm     |   2 +-
 cpan/Test-Simple/lib/Test/Builder/Module.pm        |   2 +-
 cpan/Test-Simple/lib/Test/Builder/Tester.pm        |   2 +-
 cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm  |   2 +-
 cpan/Test-Simple/lib/Test/Builder/TodoDiag.pm      |   2 +-
 cpan/Test-Simple/lib/Test/FAQ.pod                  |   4 +-
 cpan/Test-Simple/lib/Test/More.pm                  |   2 +-
 cpan/Test-Simple/lib/Test/Simple.pm                |   2 +-
 cpan/Test-Simple/lib/Test/Tester.pm                |   2 +-
 cpan/Test-Simple/lib/Test/Tester/Capture.pm        |   2 +-
 cpan/Test-Simple/lib/Test/Tester/CaptureRunner.pm  |   2 +-
 cpan/Test-Simple/lib/Test/Tester/Delegate.pm       |   2 +-
 cpan/Test-Simple/lib/Test/use/ok.pm                |   2 +-
 cpan/Test-Simple/lib/Test2.pm                      |   2 +-
 cpan/Test-Simple/lib/Test2/API.pm                  |   2 +-
 cpan/Test-Simple/lib/Test2/API/Breakage.pm         |   2 +-
 cpan/Test-Simple/lib/Test2/API/Context.pm          |   2 +-
 cpan/Test-Simple/lib/Test2/API/Instance.pm         |  11 +-
 cpan/Test-Simple/lib/Test2/API/Stack.pm            |   2 +-
 cpan/Test-Simple/lib/Test2/Event.pm                |   2 +-
 cpan/Test-Simple/lib/Test2/Event/Bail.pm           |   2 +-
 cpan/Test-Simple/lib/Test2/Event/Diag.pm           |   2 +-
 cpan/Test-Simple/lib/Test2/Event/Exception.pm      |   2 +-
 cpan/Test-Simple/lib/Test2/Event/Generic.pm        | 263 +++++++++++++++++++++
 cpan/Test-Simple/lib/Test2/Event/Note.pm           |   2 +-
 cpan/Test-Simple/lib/Test2/Event/Ok.pm             |   2 +-
 cpan/Test-Simple/lib/Test2/Event/Plan.pm           |   2 +-
 cpan/Test-Simple/lib/Test2/Event/Skip.pm           |   2 +-
 cpan/Test-Simple/lib/Test2/Event/Subtest.pm        |   2 +-
 cpan/Test-Simple/lib/Test2/Event/Waiting.pm        |   2 +-
 cpan/Test-Simple/lib/Test2/Formatter.pm            |   2 +-
 cpan/Test-Simple/lib/Test2/Formatter/TAP.pm        |   2 +-
 cpan/Test-Simple/lib/Test2/Hub.pm                  |   2 +-
 cpan/Test-Simple/lib/Test2/Hub/Interceptor.pm      |   2 +-
 .../lib/Test2/Hub/Interceptor/Terminator.pm        |   2 +-
 cpan/Test-Simple/lib/Test2/Hub/Subtest.pm          |   2 +-
 cpan/Test-Simple/lib/Test2/IPC.pm                  |   2 +-
 cpan/Test-Simple/lib/Test2/IPC/Driver.pm           |   2 +-
 cpan/Test-Simple/lib/Test2/IPC/Driver/Files.pm     |   2 +-
 cpan/Test-Simple/lib/Test2/Util.pm                 |   2 +-
 cpan/Test-Simple/lib/Test2/Util/ExternalMeta.pm    |   2 +-
 cpan/Test-Simple/lib/Test2/Util/HashBase.pm        |   2 +-
 cpan/Test-Simple/lib/Test2/Util/Trace.pm           |   2 +-
 cpan/Test-Simple/lib/ok.pm                         |   2 +-
 cpan/Test-Simple/t/00compile.t                     |  48 ----
 cpan/Test-Simple/t/Legacy/Regression/637.t         |  13 +-
 cpan/Test-Simple/t/Test2/modules/API/Instance.t    |   5 +-
 cpan/Test-Simple/t/Test2/modules/Event/Generic.t   | 129 ++++++++++
 51 files changed, 467 insertions(+), 103 deletions(-)
 create mode 100644 cpan/Test-Simple/lib/Test2/Event/Generic.pm
 delete mode 100644 cpan/Test-Simple/t/00compile.t
 create mode 100644 cpan/Test-Simple/t/Test2/modules/Event/Generic.t

diff --git a/MANIFEST b/MANIFEST
index c3e902a..a93a25a 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -2467,6 +2467,7 @@ cpan/Test-Simple/lib/Test2/API/Stack.pm
 cpan/Test-Simple/lib/Test2/Event/Bail.pm
 cpan/Test-Simple/lib/Test2/Event/Diag.pm
 cpan/Test-Simple/lib/Test2/Event/Exception.pm
+cpan/Test-Simple/lib/Test2/Event/Generic.pm
 cpan/Test-Simple/lib/Test2/Event/Note.pm
 cpan/Test-Simple/lib/Test2/Event/Ok.pm
 cpan/Test-Simple/lib/Test2/Event/Plan.pm
@@ -2505,7 +2506,6 @@ cpan/Test-Simple/lib/Test/Tester/Delegate.pm
 cpan/Test-Simple/lib/Test/Tester.pm
 cpan/Test-Simple/lib/Test/Tutorial.pod
 cpan/Test-Simple/lib/Test/use/ok.pm
-cpan/Test-Simple/t/00compile.t
 cpan/Test-Simple/t/Legacy/00test_harness_check.t
 cpan/Test-Simple/t/Legacy/01-basic.t
 cpan/Test-Simple/t/Legacy/478-cmp_ok_hash.t
@@ -2682,6 +2682,7 @@ cpan/Test-Simple/t/Test2/modules/API.t
 cpan/Test-Simple/t/Test2/modules/Event/Bail.t
 cpan/Test-Simple/t/Test2/modules/Event/Diag.t
 cpan/Test-Simple/t/Test2/modules/Event/Exception.t
+cpan/Test-Simple/t/Test2/modules/Event/Generic.t
 cpan/Test-Simple/t/Test2/modules/Event/Note.t
 cpan/Test-Simple/t/Test2/modules/Event/Ok.t
 cpan/Test-Simple/t/Test2/modules/Event/Plan.t
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index 7808d21..ac051e5 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -1056,21 +1056,25 @@ use File::Glob qw(:case);
     },
 
     'Test::Simple' => {
-        'DISTRIBUTION' => 'EXODIST/Test-Simple-1.001014.tar.gz',
+        'DISTRIBUTION' => 'EXODIST/Test-Simple-1.302026.tar.gz',
         'FILES'        => q[cpan/Test-Simple],
         'EXCLUDED'     => [
             qr{^t/xt},
             qr{^xt},
             qw( .perlcriticrc
                 .perltidyrc
+                perltidyrc
+                dist.ini
                 examples/indent.pl
                 examples/subtest.t
+                examples/tools.t
+                examples/tools.t
                 t/00compile.t
                 t/xxx-changes_updated.t
+                t/00-report.t
+                t/zzz-check-breaks.t
                 ),
         ],
-        # https://github.com/Test-More/test-more/issues/679
-        CUSTOMIZED => [ 't/Test2/modules/API/Instance.t' ],
     },
 
     'Text::Abbrev' => {
diff --git a/cpan/Test-Simple/lib/Test/Builder.pm b/cpan/Test-Simple/lib/Test/Builder.pm
index 7d51754..6e0c88e 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.302022';
+our $VERSION = '1.302026';
 
 BEGIN {
     if( $] < 5.008 ) {
diff --git a/cpan/Test-Simple/lib/Test/Builder/Formatter.pm b/cpan/Test-Simple/lib/Test/Builder/Formatter.pm
index 3994ac5..bfa429a 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.302022';
+our $VERSION = '1.302026';
 
 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 12cac88..fbdcdc2 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.302022';
+our $VERSION = '1.302026';
 
 
 =head1 NAME
diff --git a/cpan/Test-Simple/lib/Test/Builder/Tester.pm b/cpan/Test-Simple/lib/Test/Builder/Tester.pm
index d30acda..3fcf665 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.302022';
+our $VERSION = '1.302026';
 
 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 9819920..8ed6c50 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.302022';
+our $VERSION = '1.302026';
 
 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 5a915bb..379ec3b 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.302022';
+our $VERSION = '1.302026';
 
 BEGIN { require Test2::Event::Diag; our @ISA = qw(Test2::Event::Diag) }
 
diff --git a/cpan/Test-Simple/lib/Test/FAQ.pod b/cpan/Test-Simple/lib/Test/FAQ.pod
index 2f81fe0..5de8d16 100644
--- a/cpan/Test-Simple/lib/Test/FAQ.pod
+++ b/cpan/Test-Simple/lib/Test/FAQ.pod
@@ -33,7 +33,7 @@ Yes, L<Test::Class> allows you to write test methods while continuing to
 use all the usual CPAN testing modules.  It is the best and most
 perlish way to do xUnit style testing.
 
-L<Test::Unit> is a more direct port of XUnit to Perl, but it does not use
+L<Test::Unit> is a more direct port of xUnit to Perl, but it does not use
 the Perl conventions and does not play well with other CPAN testing
 modules.  As of this writing, it is abandoned.  B<Do not use>.
 
@@ -269,7 +269,7 @@ recall the Dummy Mode.
     could tell her to run naked across campus with a powercord rammed
     up her backside and she'd probably do it...  Hmmm...
 
-There seems to be a Dummy Mode WRT testing.  An otherwise competent
+There seems to be a Dummy Mode with respect to testing.  An otherwise competent
 person goes to write a test and they suddenly forget all basic
 programming practice.
 
diff --git a/cpan/Test-Simple/lib/Test/More.pm b/cpan/Test-Simple/lib/Test/More.pm
index 46c00da..275de7a 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.302022';
+our $VERSION = '1.302026';
 
 use Test::Builder::Module;
 our @ISA    = qw(Test::Builder::Module);
diff --git a/cpan/Test-Simple/lib/Test/Simple.pm b/cpan/Test-Simple/lib/Test/Simple.pm
index f89656b..d42f401 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.302022';
+our $VERSION = '1.302026';
 
 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 42ff268..28a3acb 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.302022';
+our $VERSION = '1.302026';
 
 @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 1cda453..d486dca 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.302022';
+our $VERSION = '1.302026';
 
 
 use Test::Builder;
diff --git a/cpan/Test-Simple/lib/Test/Tester/CaptureRunner.pm b/cpan/Test-Simple/lib/Test/Tester/CaptureRunner.pm
index c6ab9f6..3b0d688 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.302022';
+our $VERSION = '1.302026';
 
 
 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 c5e197f..8b1f167 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.302022';
+our $VERSION = '1.302026';
 
 
 use vars '$AUTOLOAD';
diff --git a/cpan/Test-Simple/lib/Test/use/ok.pm b/cpan/Test-Simple/lib/Test/use/ok.pm
index dc7a140..769b30f 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.302022';
+our $VERSION = '1.302026';
 
 
 __END__
diff --git a/cpan/Test-Simple/lib/Test2.pm b/cpan/Test-Simple/lib/Test2.pm
index b10886c..3f4c819 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.302022';
+our $VERSION = '1.302026';
 
 
 1;
diff --git a/cpan/Test-Simple/lib/Test2/API.pm b/cpan/Test-Simple/lib/Test2/API.pm
index 551c673..55e359a 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.302022';
+our $VERSION = '1.302026';
 
 
 my $INST;
diff --git a/cpan/Test-Simple/lib/Test2/API/Breakage.pm b/cpan/Test-Simple/lib/Test2/API/Breakage.pm
index 88499dc..7f99fa4 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.302022';
+our $VERSION = '1.302026';
 
 
 use Test2::Util qw/pkg_to_file/;
diff --git a/cpan/Test-Simple/lib/Test2/API/Context.pm b/cpan/Test-Simple/lib/Test2/API/Context.pm
index 0724ce2..a7939e3 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.302022';
+our $VERSION = '1.302026';
 
 
 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 e97e4a2..8938040 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.302022';
+our $VERSION = '1.302026';
 
 
 our @CARP_NOT = qw/Test2::API Test2::API::Instance Test2::IPC::Driver Test2::Formatter/;
@@ -270,6 +270,9 @@ sub add_ipc_driver {
 sub enable_ipc_polling {
     my $self = shift;
 
+    $self->{+_PID} = $$        unless defined $self->{+_PID};
+    $self->{+_TID} = get_tid() unless defined $self->{+_TID};
+
     $self->add_context_init_callback(
         # This is called every time a context is created, it needs to be fast.
         # $_[0] is a context object
@@ -297,6 +300,9 @@ sub ipc_enable_shm {
 
     return 1 if defined $self->{+IPC_SHM_ID};
 
+    $self->{+_PID} = $$        unless defined $self->{+_PID};
+    $self->{+_TID} = get_tid() unless defined $self->{+_TID};
+
     my ($ok, $err) = try {
         require IPC::SysV;
 
@@ -487,8 +493,7 @@ This is not a supported configuration, you will have problems.
 
     $new_exit = 255 if $new_exit > 255;
 
-    if ($new_exit) {
-        require Test2::API::Breakage;
+    if ($new_exit && eval { require Test2::API::Breakage; 1 }) {
         my @warn = Test2::API::Breakage->report();
 
         if (@warn) {
diff --git a/cpan/Test-Simple/lib/Test2/API/Stack.pm b/cpan/Test-Simple/lib/Test2/API/Stack.pm
index d0f1b34..c6478d1 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.302022';
+our $VERSION = '1.302026';
 
 
 use Test2::Hub();
diff --git a/cpan/Test-Simple/lib/Test2/Event.pm b/cpan/Test-Simple/lib/Test2/Event.pm
index 3d8b2f8..d350210 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.302022';
+our $VERSION = '1.302026';
 
 
 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 6ddba2a..4f8ae0f 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.302022';
+our $VERSION = '1.302026';
 
 
 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 bdb68c3..c50e9a9 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.302022';
+our $VERSION = '1.302026';
 
 
 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 43acd25..1280ada 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.302022';
+our $VERSION = '1.302026';
 
 
 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
new file mode 100644
index 0000000..92b04fb
--- /dev/null
+++ b/cpan/Test-Simple/lib/Test2/Event/Generic.pm
@@ -0,0 +1,263 @@
+package Test2::Event::Generic;
+use strict;
+use warnings;
+
+use Carp qw/croak/;
+use Scalar::Util qw/reftype/;
+
+our $VERSION = '1.302026';
+
+BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
+use Test2::Util::HashBase;
+
+my @FIELDS = qw{
+    causes_fail increments_count diagnostics no_display callback terminate
+    global sets_plan summary
+};
+my %DEFAULTS = (
+    causes_fail      => 0,
+    increments_count => 0,
+    diagnostics      => 0,
+    no_display       => 0,
+);
+
+sub init {
+    my $self = shift;
+
+    for my $field (@FIELDS) {
+        my $val = defined $self->{$field} ? delete $self->{$field} : $DEFAULTS{$field};
+        next unless defined $val;
+
+        my $set = "set_$field";
+        $self->$set($val);
+    }
+}
+
+for my $field (@FIELDS) {
+    no strict 'refs';
+    my $stash = \%{__PACKAGE__ . "::"};
+
+    *$field = sub { exists $_[0]->{$field} ? $_[0]->{$field} : () }
+        unless defined $stash->{$field}
+            && defined *{$stash->{$field}}{CODE};
+
+    *{"set_$field"} = sub { $_[0]->{$field} = $_[1] }
+        unless defined $stash->{"set_$field"}
+            && defined *{$stash->{"set_$field"}}{CODE};
+}
+
+sub summary {
+    my $self = shift;
+    return $self->{summary} if defined $self->{summary};
+    $self->SUPER::summary();
+}
+
+sub sets_plan {
+    my $self = shift;
+    return unless $self->{sets_plan};
+    return @{$self->{sets_plan}};
+}
+
+sub callback {
+    my $self = shift;
+    my $cb = $self->{callback} || return;
+    $self->$cb(@_);
+}
+
+sub set_global {
+    my $self = shift;
+    my ($bool) = @_;
+
+    if(!defined $bool) {
+        delete $self->{global};
+        return undef;
+    }
+
+    $self->{global} = $bool;
+}
+
+sub set_callback {
+    my $self = shift;
+    my ($cb) = @_;
+
+    if(!defined $cb) {
+        delete $self->{callback};
+        return undef;
+    }
+
+    croak "callback must be a code reference"
+        unless ref($cb) && reftype($cb) eq 'CODE';
+
+    $self->{callback} = $cb;
+}
+
+sub set_terminate {
+    my $self = shift;
+    my ($exit) = @_;
+
+    if(!defined $exit) {
+        delete $self->{terminate};
+        return undef;
+    }
+
+    croak "terminate must be a positive integer"
+       unless $exit =~ m/^\d+$/;
+
+    $self->{terminate} = $exit;
+}
+
+sub set_sets_plan {
+    my $self = shift;
+    my ($plan) = @_;
+
+    if(!defined $plan) {
+        delete $self->{sets_plan};
+        return undef;
+    }
+
+    croak "'sets_plan' must be an array reference"
+        unless ref($plan) && reftype($plan) eq 'ARRAY';
+
+    $self->{sets_plan} = $plan;
+}
+
+1;
+
+__END__
+
+=pod
+
+=encoding UTF-8
+
+=head1 NAME
+
+Test2::Event::Generic - Generic event type.
+
+=head1 DESCRIPTION
+
+This is a generic event that lets you customize all fields in the event API.
+This is useful if you have need for a custom event that does not make sense as
+a published reusable event subclass.
+
+=head1 SYNOPSIS
+
+    use Test2::API qw/context/;
+
+    sub send_custom_fail {
+        my $ctx = shift;
+
+        $ctx->send_event('Generic', causes_fail => 1, summary => 'The sky is falling');
+
+        $ctx->release;
+    }
+
+    send_custom_fail();
+
+=head1 METHODS
+
+=over 4
+
+=item $e->callback($hub)
+
+Call the custom callback if one is set, otherwise this does nothing.
+
+=item $e->set_callback(sub { ... })
+
+Set the custom callback. The custom callback must be a coderef. The first
+argument to your callback will be the event itself, the second will be the
+L<Test2::Event::Hub> that is using the callback.
+
+=item $bool = $e->causes_fail
+
+=item $e->set_causes_fail($bool)
+
+Get/Set the C<causes_fail> attribute. This defaults to C<0>.
+
+=item $bool = $e->diagnostics
+
+=item $e->set_diagnostics($bool)
+
+Get/Set the C<diagnostics> attribute. This defaults to C<0>.
+
+=item $bool_or_undef = $e->global
+
+=item @bool_or_empty = $e->global
+
+=item $e->set_global($bool_or_undef)
+
+Get/Set the C<diagnostics> attribute. This defaults to an empty list which is
+undef in scalar context.
+
+=item $bool = $e->increments_count
+
+=item $e->set_increments_count($bool)
+
+Get/Set the C<increments_count> attribute. This defaults to C<0>.
+
+=item $bool = $e->no_display
+
+=item $e->set_no_display($bool)
+
+Get/Set the C<no_display> attribute. This defaults to C<0>.
+
+=item @plan = $e->sets_plan
+
+Get the plan if this event sets one. The plan is a list of up to 3 items:
+C<($count, $directive, $reason)>. C<$count> must be defined, the others may be
+undef, or may not exist at all.
+
+=item $e->set_sets_plan(\@plan)
+
+Set the plan. You must pass in an arrayref with up to 3 elements.
+
+=item $summary = $e->summary
+
+=item $e->set_summary($summary_or_undef)
+
+Get/Set the summary. This will default to the event package
+C<'Test2::Event::Generic'>. You can set it to any value. Setting this to
+C<undef> will reset it to the default.
+
+=item $int_or_undef = $e->terminate
+
+=item @int_or_empty = $e->terminate
+
+=item $e->set_terminate($int_or_undef)
+
+This will get/set the C<terminate> attribute. This defaults to undef in scalar
+context, or an empty list in list context. Setting this to undef will clear it
+completely. This must be set to a positive integer (0 or larger).
+
+=back
+
+=head1 SOURCE
+
+The source code repository for Test2 can be found at
+F<http://github.com/Test-More/test-more/>.
+
+=head1 MAINTAINERS
+
+=over 4
+
+=item Chad Granum E<lt>exodist@cpan.orgE<gt>
+
+=back
+
+=head1 AUTHORS
+
+=over 4
+
+=item Chad Granum E<lt>exodist@cpan.orgE<gt>
+
+=back
+
+=head1 COPYRIGHT
+
+Copyright 2016 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.
+
+See F<http://dev.perl.org/licenses/>
+
+=cut
diff --git a/cpan/Test-Simple/lib/Test2/Event/Note.pm b/cpan/Test-Simple/lib/Test2/Event/Note.pm
index 9038a3d..b35a29a 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.302022';
+our $VERSION = '1.302026';
 
 
 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 edf6d22..a3ea262 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.302022';
+our $VERSION = '1.302026';
 
 
 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 f3f4398..599df67 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.302022';
+our $VERSION = '1.302026';
 
 
 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 1facd66..ef08022 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.302022';
+our $VERSION = '1.302026';
 
 
 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 1497be6..0d95424 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.302022';
+our $VERSION = '1.302026';
 
 
 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 bceadc0..15d0b0a61 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.302022';
+our $VERSION = '1.302026';
 
 
 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 84fd97e..7e1313a 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.302022';
+our $VERSION = '1.302026';
 
 
 my %ADDED;
diff --git a/cpan/Test-Simple/lib/Test2/Formatter/TAP.pm b/cpan/Test-Simple/lib/Test2/Formatter/TAP.pm
index a17a6d9..20086e1 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.302022';
+our $VERSION = '1.302026';
 
 
 use Test2::Util::HashBase qw{
diff --git a/cpan/Test-Simple/lib/Test2/Hub.pm b/cpan/Test-Simple/lib/Test2/Hub.pm
index 2a7dcc6..0b0d33b 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.302022';
+our $VERSION = '1.302026';
 
 
 use Carp qw/carp croak confess/;
diff --git a/cpan/Test-Simple/lib/Test2/Hub/Interceptor.pm b/cpan/Test-Simple/lib/Test2/Hub/Interceptor.pm
index 57e2bfa..006e3b6 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.302022';
+our $VERSION = '1.302026';
 
 
 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 d76891a..98a1209 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.302022';
+our $VERSION = '1.302026';
 
 
 1;
diff --git a/cpan/Test-Simple/lib/Test2/Hub/Subtest.pm b/cpan/Test-Simple/lib/Test2/Hub/Subtest.pm
index f779c80..4e3a8bc 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.302022';
+our $VERSION = '1.302026';
 
 
 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 76e83f6..d2626d9 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.302022';
+our $VERSION = '1.302026';
 
 
 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 e9df53b..4c29e42 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.302022';
+our $VERSION = '1.302026';
 
 
 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 e857e46..53530d7 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.302022';
+our $VERSION = '1.302026';
 
 
 BEGIN { require Test2::IPC::Driver; our @ISA = qw(Test2::IPC::Driver) }
diff --git a/cpan/Test-Simple/lib/Test2/Util.pm b/cpan/Test-Simple/lib/Test2/Util.pm
index b31ceb5..a903b6c 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.302022';
+our $VERSION = '1.302026';
 
 
 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 c7e6ea2..1083ace 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.302022';
+our $VERSION = '1.302026';
 
 
 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 0f20433..d3583a4 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.302022';
+our $VERSION = '1.302026';
 
 
 require Carp;
diff --git a/cpan/Test-Simple/lib/Test2/Util/Trace.pm b/cpan/Test-Simple/lib/Test2/Util/Trace.pm
index 43e7bab..5afeccf 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.302022';
+our $VERSION = '1.302026';
 
 
 use Test2::Util qw/get_tid/;
diff --git a/cpan/Test-Simple/lib/ok.pm b/cpan/Test-Simple/lib/ok.pm
index d6ca797..8670163 100644
--- a/cpan/Test-Simple/lib/ok.pm
+++ b/cpan/Test-Simple/lib/ok.pm
@@ -1,5 +1,5 @@
 package ok;
-$ok::VERSION = '1.302022';
+$ok::VERSION = '1.302026';
 
 use strict;
 use Test::More ();
diff --git a/cpan/Test-Simple/t/00compile.t b/cpan/Test-Simple/t/00compile.t
deleted file mode 100644
index 049f989..0000000
--- a/cpan/Test-Simple/t/00compile.t
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN {
-    if( $ENV{PERL_CORE} ) {
-        @INC = ('../lib', 'lib');
-    }
-    else {
-        unshift @INC, 't/lib';
-    }
-}
-chdir 't';
-
-use Test::More;
-
-my $Has_Test_Pod;
-BEGIN {
-    $Has_Test_Pod = eval 'use Test::Pod 0.95; 1';
-}
-
-chdir "..";
-my $manifest = "MANIFEST";
-open(my $manifest_fh, "<", $manifest) or plan(skip_all => "Can't open $manifest: $!");
-my @modules = map  { m{^lib/(\S+)}; $1 } 
-              grep { m{^lib/Test/\S*\.pm} } 
-              grep { !m{/t/} } <$manifest_fh>;
-
-chomp @modules;
-close $manifest_fh;
-
-chdir 'lib';
-plan tests => scalar @modules * 2;
-foreach my $file (@modules) {
-    # Make sure we look at the local files and do not reload them if
-    # they're already loaded.  This avoids recompilation warnings.
-    local @INC = @INC;
-    unshift @INC, ".";
-    my @warnings;
-    ok eval {
-        local $SIG{__WARN__} = sub { push @warnings => @_ };
-        require($file);
-        1
-    } or diag "require $file failed.", "\n", @warnings, "\n", $@;
-
-    SKIP: {
-        skip "Test::Pod not installed", 1 unless $Has_Test_Pod;
-        pod_file_ok($file);
-    }
-}
diff --git a/cpan/Test-Simple/t/Legacy/Regression/637.t b/cpan/Test-Simple/t/Legacy/Regression/637.t
index fcf0f10..c3aaf44 100644
--- a/cpan/Test-Simple/t/Legacy/Regression/637.t
+++ b/cpan/Test-Simple/t/Legacy/Regression/637.t
@@ -4,10 +4,19 @@ use warnings;
 use Test2::Util qw/CAN_THREAD/;
 BEGIN {
     unless(CAN_THREAD) {
-        require Test::More;
-        Test::More->import(skip_all => "threads are not supported");
+        print "1..0 # Skip threads are not supported.\n";
+        exit 0;
     }
 }
+
+BEGIN {
+    unless ( $ENV{AUTHOR_TESTING} ) {
+        print "1..0 # Skip many perls have broken threads.  Enable with AUTHOR_TESTING.\n";
+        exit 0;
+    }
+}
+
+use Test2::IPC;
 use threads;
 use Test::More;
 
diff --git a/cpan/Test-Simple/t/Test2/modules/API/Instance.t b/cpan/Test-Simple/t/Test2/modules/API/Instance.t
index d1f4c3b..294224c 100644
--- a/cpan/Test-Simple/t/Test2/modules/API/Instance.t
+++ b/cpan/Test-Simple/t/Test2/modules/API/Instance.t
@@ -5,8 +5,6 @@ use Test2::IPC;
 BEGIN { require "t/tools.pl" };
 use Test2::Util qw/CAN_THREAD CAN_REALLY_FORK USE_THREADS get_tid/;
 
-skip_all("Leaks shm blocks");
-
 my $CLASS = 'Test2::API::Instance';
 
 my $one = $CLASS->new;
@@ -430,6 +428,7 @@ if (CAN_REALLY_FORK) {
 
 {
     $one->reset;
+
     ok(!@{$one->context_init_callbacks}, "no callbacks");
     is($one->ipc_polling, undef, "no polling, undef");
 
@@ -443,6 +442,8 @@ if (CAN_REALLY_FORK) {
     use warnings;
 
     $one->enable_ipc_polling;
+    ok(defined($one->{_pid}), "pid is defined");
+    ok(defined($one->{_tid}), "tid is defined");
     is(@{$one->context_init_callbacks}, 1, "added the callback");
     is($one->ipc_polling, 1, "polling on");
     $one->set_ipc_shm_last('abc1');
diff --git a/cpan/Test-Simple/t/Test2/modules/Event/Generic.t b/cpan/Test-Simple/t/Test2/modules/Event/Generic.t
new file mode 100644
index 0000000..4838d55
--- /dev/null
+++ b/cpan/Test-Simple/t/Test2/modules/Event/Generic.t
@@ -0,0 +1,129 @@
+use strict;
+use warnings;
+
+BEGIN { require "t/tools.pl" };
+use Test2::Util::Trace;
+
+use Test2::API qw/context intercept/;
+
+sub tool {
+    my $ctx = context();
+    my $e = $ctx->send_event('Generic', @_);
+    $ctx->release;
+    return $e;
+}
+
+my $e;
+intercept { $e = tool() };
+
+ok($e,                               "got event");
+ok($e->isa('Test2::Event'),          "It is an event");
+ok($e->isa('Test2::Event::Generic'), "It is an event");
+delete $e->{trace};
+is_deeply(
+    $e,
+    {
+        causes_fail      => 0,
+        increments_count => 0,
+        diagnostics      => 0,
+        no_display       => 0,
+    },
+    "Defaults"
+);
+
+for my $f (qw/causes_fail increments_count diagnostics no_display/) {
+    is($e->$f, 0, "'$f' is 0");
+    is_deeply([$e->$f], [0], "'$f' is 0 is list context as well");
+
+    my $set = "set_$f";
+    $e->$set(1);
+    is($e->$f, 1, "'$f' was set to 1");
+}
+
+for my $f (qw/callback terminate global sets_plan/) {
+    is($e->$f, undef, "no $f");
+    is_deeply([$e->$f], [], "$f is empty in list context");
+}
+
+like($e->summary, qr/Test2::Event::Generic/, "Got base class summary");
+
+like(
+    exception { $e->set_sets_plan('bad') },
+    qr/'sets_plan' must be an array reference/,
+    "Must provide an arrayref"
+);
+
+$e->set_sets_plan([0, skip => 'cause']);
+is_deeply([$e->sets_plan], [0, skip => 'cause'], "sets_plan returns a list, not a ref");
+$e->set_sets_plan(undef);
+ok(!exists $e->{sets_plan}, "Removed sets_plan key");
+ok(!$e->sets_plan, "sets_plan is cleared");
+
+$e->set_global(0);
+is($e->global, 0, "global is off");
+$e->set_global(1);
+is($e->global, 1, "global is on");
+$e->set_global(0);
+is($e->global, 0, "global is again");
+$e->set_global(undef);
+ok(!exists $e->{global}, "removed global key");
+is($e->global, undef, "global is not defined");
+
+like(
+    exception { $e->set_callback('dogfood') },
+    qr/callback must be a code reference/,
+    "Callback must be code"
+);
+
+my $ran = 0;
+$e->set_callback(sub {
+    $ran++;
+    my $self = shift;
+    is($self, $e, "got self");
+    is_deeply( \@_, ['a', 'b', 'c'], "Got args" );
+    return 'foo';
+});
+is($e->callback('a', 'b', 'c'), 'foo', "got callback's return");
+ok($ran, "ran callback");
+
+$e->set_callback(undef);
+ok(!$e->callback, "no callback");
+ok(!exists $e->{callback}, "no callback key");
+
+like(
+    exception { $e->set_terminate('1.1') },
+    qr/terminate must be a positive integer/,
+    "terminate only takes integers"
+);
+
+like(
+    exception { $e->set_terminate('foo') },
+    qr/terminate must be a positive integer/,
+    "terminate only takes numbers"
+);
+
+like(
+    exception { $e->set_terminate('-1') },
+    qr/terminate must be a positive integer/,
+    "terminate only takes positive integers"
+);
+
+$e->set_terminate(0),
+is($e->terminate, 0, "set to 0, 0 is valid");
+$e->set_terminate(1),
+is($e->terminate, 1, "set to 1");
+$e->set_terminate(123),
+is($e->terminate, 123, "set to 123");
+$e->set_terminate(0),
+is($e->terminate, 0, "set to 0, 0 is valid");
+
+$e->set_terminate(undef);
+is($e->terminate, undef, "terminate is not defined");
+ok(!exists $e->{terminate}, "no terminate key");
+
+# Test constructor args
+intercept { $e = tool(causes_fail => 1, increments_count => 'a') };
+is($e->causes_fail, 1, "attr from constructor");
+is($e->increments_count, 'a', "attr from constructor");
+
+done_testing;
-- 
2.8.2

@p5pRT
Copy link
Author

p5pRT commented Jun 8, 2016

From @jkeenan

Thanks for the update, pushed to blead in commit c6a6e1c

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Jun 8, 2016

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jun 8, 2016

@jkeenan - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant