summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MANIFEST3
-rwxr-xr-xPorting/Maintainers.pl10
-rw-r--r--cpan/Test-Simple/lib/Test/Builder.pm2
-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/FAQ.pod4
-rw-r--r--cpan/Test-Simple/lib/Test/More.pm2
-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.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2/API/Breakage.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2/API/Context.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2/API/Instance.pm11
-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.pm263
-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.pm2
-rw-r--r--cpan/Test-Simple/lib/Test2/Hub.pm2
-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/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/00compile.t48
-rw-r--r--cpan/Test-Simple/t/Legacy/Regression/637.t13
-rw-r--r--cpan/Test-Simple/t/Test2/modules/API/Instance.t5
-rw-r--r--cpan/Test-Simple/t/Test2/modules/Event/Generic.t129
51 files changed, 467 insertions, 103 deletions
diff --git a/MANIFEST b/MANIFEST
index c3e902a86d..a93a25a067 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 7808d21499..ac051e5b04 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 7d51754f97..6e0c88eddd 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 3994ac5062..bfa429a0b3 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 12cac8886c..fbdcdc28d6 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 d30acda4a7..3fcf6657e8 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 9819920637..8ed6c504b1 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 5a915bbd90..379ec3b966 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 2f81fe0da3..5de8d16bc9 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 46c00da36e..275de7adc3 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 f89656b0c3..d42f4014c5 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 42ff268f7b..28a3acb7a6 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 1cda453197..d486dca373 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 c6ab9f61a6..3b0d688443 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 c5e197ffeb..8b1f167d54 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 dc7a14069c..769b30f3d2 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 b10886cd0e..3f4c8190de 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 551c6732e8..55e359ac42 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 88499dce4d..7f99fa4569 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 0724ce2aa8..a7939e3a18 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 e97e4a2aa1..8938040e0b 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 d0f1b34c96..c6478d1ce8 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 3d8b2f8b19..d350210298 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 6ddba2a0cb..4f8ae0fac8 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 bdb68c306d..c50e9a9cd2 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 43acd25004..1280ada5b0 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 0000000000..92b04fb2d8
--- /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 9038a3da94..b35a29a787 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 edf6d228a0..a3ea2622c1 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 f3f4398059..599df6716f 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 1facd66f42..ef08022480 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 1497be68bd..0d95424e36 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 bceadc09ea..15d0b0a61b 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 84fd97eb45..7e1313ace4 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 a17a6d98dd..20086e17d5 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 2a7dcc6101..0b0d33bcfe 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 57e2bfaf26..006e3b6fc4 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 d76891ac5d..98a1209792 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 f779c80263..4e3a8bc4ba 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 76e83f6a2a..d2626d98ab 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 e9df53bbfb..4c29e42d35 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 e857e469b6..53530d7ef5 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 b31ceb5cb9..a903b6c310 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 c7e6ea2287..1083ace2a5 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 0f20433811..d3583a4738 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 43e7bab463..5afeccf06e 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 d6ca797f6b..8670163a7f 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 049f989983..0000000000
--- 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 fcf0f108ae..c3aaf44c79 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 d1f4c3b4d1..294224cefc 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 0000000000..4838d55c77
--- /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;