This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Sync cpan/Test-Simple with CPAN version 1.302111.
authorJames E Keenan <jkeenan@cpan.org>
Sat, 18 Nov 2017 20:48:18 +0000 (15:48 -0500)
committerJames E Keenan <jkeenan@cpan.org>
Sat, 18 Nov 2017 20:48:18 +0000 (15:48 -0500)
77 files changed:
MANIFEST
Porting/Maintainers.pl
cpan/Test-Simple/lib/Test/Builder.pm
cpan/Test-Simple/lib/Test/Builder/Formatter.pm
cpan/Test-Simple/lib/Test/Builder/Module.pm
cpan/Test-Simple/lib/Test/Builder/Tester.pm
cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm
cpan/Test-Simple/lib/Test/Builder/TodoDiag.pm
cpan/Test-Simple/lib/Test/More.pm
cpan/Test-Simple/lib/Test/Simple.pm
cpan/Test-Simple/lib/Test/Tester.pm
cpan/Test-Simple/lib/Test/Tester/Capture.pm
cpan/Test-Simple/lib/Test/Tester/CaptureRunner.pm
cpan/Test-Simple/lib/Test/Tester/Delegate.pm
cpan/Test-Simple/lib/Test/use/ok.pm
cpan/Test-Simple/lib/Test2.pm
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/Stack.pm
cpan/Test-Simple/lib/Test2/Event.pm
cpan/Test-Simple/lib/Test2/Event/Bail.pm
cpan/Test-Simple/lib/Test2/Event/Diag.pm
cpan/Test-Simple/lib/Test2/Event/Encoding.pm
cpan/Test-Simple/lib/Test2/Event/Exception.pm
cpan/Test-Simple/lib/Test2/Event/Fail.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/Pass.pm
cpan/Test-Simple/lib/Test2/Event/Plan.pm
cpan/Test-Simple/lib/Test2/Event/Skip.pm
cpan/Test-Simple/lib/Test2/Event/Subtest.pm
cpan/Test-Simple/lib/Test2/Event/TAP/Version.pm
cpan/Test-Simple/lib/Test2/Event/Waiting.pm
cpan/Test-Simple/lib/Test2/EventFacet.pm
cpan/Test-Simple/lib/Test2/EventFacet/About.pm
cpan/Test-Simple/lib/Test2/EventFacet/Amnesty.pm
cpan/Test-Simple/lib/Test2/EventFacet/Assert.pm
cpan/Test-Simple/lib/Test2/EventFacet/Control.pm
cpan/Test-Simple/lib/Test2/EventFacet/Error.pm
cpan/Test-Simple/lib/Test2/EventFacet/Info.pm
cpan/Test-Simple/lib/Test2/EventFacet/Meta.pm
cpan/Test-Simple/lib/Test2/EventFacet/Parent.pm
cpan/Test-Simple/lib/Test2/EventFacet/Plan.pm
cpan/Test-Simple/lib/Test2/EventFacet/Trace.pm
cpan/Test-Simple/lib/Test2/Formatter.pm
cpan/Test-Simple/lib/Test2/Formatter/TAP.pm
cpan/Test-Simple/lib/Test2/Hub.pm
cpan/Test-Simple/lib/Test2/Hub/Interceptor.pm
cpan/Test-Simple/lib/Test2/Hub/Interceptor/Terminator.pm
cpan/Test-Simple/lib/Test2/Hub/Subtest.pm
cpan/Test-Simple/lib/Test2/IPC.pm
cpan/Test-Simple/lib/Test2/IPC/Driver.pm
cpan/Test-Simple/lib/Test2/IPC/Driver/Files.pm
cpan/Test-Simple/lib/Test2/Tools/Tiny.pm
cpan/Test-Simple/lib/Test2/Util.pm
cpan/Test-Simple/lib/Test2/Util/ExternalMeta.pm
cpan/Test-Simple/lib/Test2/Util/Facets2Legacy.pm
cpan/Test-Simple/lib/Test2/Util/HashBase.pm
cpan/Test-Simple/lib/Test2/Util/Trace.pm
cpan/Test-Simple/lib/ok.pm
cpan/Test-Simple/t/Legacy/Builder/Builder.t
cpan/Test-Simple/t/Legacy/Builder/details.t
cpan/Test-Simple/t/Legacy/Builder/no_ending.t
cpan/Test-Simple/t/Legacy/Builder/reset.t
cpan/Test-Simple/t/Legacy/Regression/789-read-only.t
cpan/Test-Simple/t/Legacy/Tester/tbt_09do.t
cpan/Test-Simple/t/Legacy/buffer.t
cpan/Test-Simple/t/Legacy/check_tests.t
cpan/Test-Simple/t/Legacy/exit.t
cpan/Test-Simple/t/Legacy/undef.t
cpan/Test-Simple/t/Legacy_And_Test2/diag_event_on_ok.t [new file with mode: 0644]
cpan/Test-Simple/t/Test2/behavior/ipc_wait_timeout.t
cpan/Test-Simple/t/Test2/modules/API/Instance.t
pod/perldelta.pod

index ac54b47..c90c81c 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -2440,6 +2440,7 @@ cpan/Test-Simple/t/Legacy/useing.t
 cpan/Test-Simple/t/Legacy/utf8.t
 cpan/Test-Simple/t/Legacy/versions.t
 cpan/Test-Simple/t/Legacy_And_Test2/builder_loaded_late.t
+cpan/Test-Simple/t/Legacy_And_Test2/diag_event_on_ok.t
 cpan/Test-Simple/t/Legacy_And_Test2/hidden_warnings.t
 cpan/Test-Simple/t/Legacy_And_Test2/preload_diag_note.t
 cpan/Test-Simple/t/lib/Dev/Null.pm
index 2725106..930bcc9 100755 (executable)
@@ -1071,7 +1071,7 @@ use File::Glob qw(:case);
     },
 
     'Test::Simple' => {
-        'DISTRIBUTION' => 'EXODIST/Test-Simple-1.302103.tar.gz',
+        'DISTRIBUTION' => 'EXODIST/Test-Simple-1.302111.tar.gz',
         'FILES'        => q[cpan/Test-Simple],
         'EXCLUDED'     => [
             qr{^examples/},
index d570910..41d5cbb 100644 (file)
@@ -4,7 +4,7 @@ use 5.006;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 BEGIN {
     if( $] < 5.008 ) {
@@ -700,8 +700,7 @@ sub _ok_debug {
 
     my (undef, $file, $line) = $trace->call;
     if (defined $orig_name) {
-        $self->diag(qq[  $msg test '$orig_name'\n]);
-        $self->diag(qq[  at $file line $line.\n]);
+        $self->diag(qq[  $msg test '$orig_name'\n  at $file line $line.\n]);
     }
     else {
         $self->diag(qq[  $msg test at $file line $line.\n]);
index 0749eed..35fa133 100644 (file)
@@ -2,7 +2,7 @@ package Test::Builder::Formatter;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 BEGIN { require Test2::Formatter::TAP; our @ISA = qw(Test2::Formatter::TAP) }
 
index d65a266..adc010c 100644 (file)
@@ -7,7 +7,7 @@ use Test::Builder;
 require Exporter;
 our @ISA = qw(Exporter);
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 
 =head1 NAME
index 2ab235e..9168df0 100644 (file)
@@ -1,7 +1,7 @@
 package Test::Builder::Tester;
 
 use strict;
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 use Test::Builder;
 use Symbol;
index f31993f..049d286 100644 (file)
@@ -1,7 +1,7 @@
 package Test::Builder::Tester::Color;
 
 use strict;
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 require Test::Builder::Tester;
 
index afa2d23..5a783c4 100644 (file)
@@ -2,7 +2,7 @@ package Test::Builder::TodoDiag;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 BEGIN { require Test2::Event::Diag; our @ISA = qw(Test2::Event::Diag) }
 
index c00b010..15cb6a5 100644 (file)
@@ -17,7 +17,7 @@ sub _carp {
     return warn @_, " at $file line $line\n";
 }
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 use Test::Builder::Module;
 our @ISA    = qw(Test::Builder::Module);
index 4491e0a..9001153 100644 (file)
@@ -4,7 +4,7 @@ use 5.006;
 
 use strict;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 use Test::Builder::Module;
 our @ISA    = qw(Test::Builder::Module);
index 431922a..cc48ac7 100644 (file)
@@ -6,7 +6,7 @@ BEGIN
 {
        if (*Test::Builder::new{CODE})
        {
-               warn "You should load Test::Tester before Test::Builder (or anything that loads Test::Builder)" 
+               warn "You should load Test::Tester before Test::Builder (or anything that loads Test::Builder)"
        }
 }
 
@@ -18,7 +18,7 @@ require Exporter;
 
 use vars qw( @ISA @EXPORT );
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 @EXPORT = qw( run_tests check_tests check_test cmp_results show_space );
 @ISA = qw( Exporter );
@@ -173,40 +173,54 @@ sub cmp_result
 
        if (defined(my $exp = $expect->{diag}))
        {
-               # if there actually is some diag then put a \n on the end if it's not
-               # there already
 
-               $exp .= "\n" if (length($exp) and $exp !~ /\n$/);
-               if (not $Test->ok($result->{diag} eq $exp,
-                       "subtest '$sub_name' of '$name' compare diag")
-               )
-               {
-                       my $got = $result->{diag};
-                       my $glen = length($got);
-                       my $elen = length($exp);
-                       for ($got, $exp)
-                       {
-                               my @lines = split("\n", $_);
-                               $_ = join("\n", map {
-                                       if ($want_space)
-                                       {
-                                               $_ = $colour.escape($_).$reset;
-                                       }
-                                       else
-                                       {
-                                               "'$colour$_$reset'"
-                                       }
-                               } @lines);
-                       }
-
-                       $Test->diag(<<EOM);
+        my $got = '';
+        if (ref $exp eq 'Regexp') {
+
+            if (not $Test->like($result->{diag}, $exp,
+                "subtest '$sub_name' of '$name' compare diag"))
+            {
+                $got = $result->{diag};
+            }
+
+        } else {
+
+            # if there actually is some diag then put a \n on the end if it's not
+            # there already
+            $exp .= "\n" if (length($exp) and $exp !~ /\n$/);
+
+            if (not $Test->ok($result->{diag} eq $exp,
+                       "subtest '$sub_name' of '$name' compare diag"))
+            {
+                $got = $result->{diag};
+            }
+        }
+
+        if ($got) {
+               my $glen = length($got);
+               my $elen = length($exp);
+               for ($got, $exp)
+               {
+                       my @lines = split("\n", $_);
+                       $_ = join("\n", map {
+                               if ($want_space)
+                               {
+                                       $_ = $colour.escape($_).$reset;
+                               }
+                               else
+                               {
+                                       "'$colour$_$reset'"
+                               }
+                       } @lines);
+               }
+
+               $Test->diag(<<EOM);
 Got diag ($glen bytes):
 $got
 Expected diag ($elen bytes):
 $exp
 EOM
-
-               }
+        }
        }
 }
 
@@ -315,6 +329,23 @@ Test::Tester - Ease testing test modules built with Test::Builder
 
 or
 
+  use Test::Tester tests => 6;
+
+  use Test::MyStyle;
+
+  check_test(
+    sub {
+      is_mystyle_qr("this", "that", "not matching");
+    },
+    {
+      ok => 0, # expect this to fail
+      name => "not matching",
+      diag => qr/Expected: 'this'\s+Got: 'that'/,
+    }
+  );
+
+or
+
   use Test::Tester;
 
   use Test::More tests => 3;
@@ -378,6 +409,16 @@ you can get direct access to the test results:
 
   like($result[0]->{diag}, "/^Database ping took \\d+ seconds$"/, "diag");
 
+or
+
+  check_test(
+    sub { is_mystyle_qr("this", "that", "not matching") },
+    {
+      ok => 0, # we expect the test to fail
+      name => "not matching",
+      diag => qr/Expected: 'this'\s+Got: 'that'/,
+    }
+  );
 
 We cannot predict how long the database ping will take so we use
 Test::More's like() test to check that the diagnostic string is of the right
index a76fad0..d9b7fe0 100644 (file)
@@ -2,7 +2,7 @@ use strict;
 
 package Test::Tester::Capture;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 
 use Test::Builder;
index 3fe977d..3ae6409 100644 (file)
@@ -3,7 +3,7 @@ use strict;
 
 package Test::Tester::CaptureRunner;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 
 use Test::Tester::Capture;
index 515595b..0ae2e93 100644 (file)
@@ -3,7 +3,7 @@ use warnings;
 
 package Test::Tester::Delegate;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 use Scalar::Util();
 
index 0c819bb..2a3d45c 100644 (file)
@@ -1,7 +1,7 @@
 package Test::use::ok;
 use 5.005;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 
 __END__
index cf5b661..9526cd5 100644 (file)
@@ -2,7 +2,7 @@ package Test2;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 
 1;
index ad64964..b2eeb2c 100644 (file)
@@ -9,7 +9,7 @@ BEGIN {
     $ENV{TEST2_ACTIVE} = 1;
 }
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 
 my $INST;
index ebb190d..d4b9eaf 100644 (file)
@@ -2,7 +2,7 @@ package Test2::API::Breakage;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 
 use Test2::Util qw/pkg_to_file/;
index 601b3de..76fecba 100644 (file)
@@ -2,7 +2,7 @@ package Test2::API::Context;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 
 use Carp qw/confess croak/;
index 23dba6c..0f415f6 100644 (file)
@@ -2,7 +2,7 @@ package Test2::API::Instance;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 
 our @CARP_NOT = qw/Test2::API Test2::API::Instance Test2::IPC::Driver Test2::Formatter/;
@@ -334,12 +334,13 @@ sub enable_ipc_polling {
             return $_[0]->{hub}->cull unless $self->{+IPC_SHM_ID};
 
             my $val;
-            {
-                shmread($self->{+IPC_SHM_ID}, $val, 0, $self->{+IPC_SHM_SIZE}) or return;
-
+            if(shmread($self->{+IPC_SHM_ID}, $val, 0, $self->{+IPC_SHM_SIZE})) {
                 return if $val eq $self->{+IPC_SHM_LAST};
                 $self->{+IPC_SHM_LAST} = $val;
             }
+            else {
+                warn "SHM Read error: $!\n";
+            }
 
             $_[0]->{hub}->cull;
         }
@@ -368,10 +369,14 @@ sub ipc_enable_shm {
 
         my $ipc_key = IPC::SysV::IPC_PRIVATE();
         my $shm_size = $self->{+IPC}->can('shm_size') ? $self->{+IPC}->shm_size : 64;
-        my $shm_id = shmget($ipc_key, $shm_size, 0666) or die;
+        my $shm_id = shmget($ipc_key, $shm_size, 0666) or die "Could not get shm: $!";
 
         my $initial = 'a' x $shm_size;
-        shmwrite($shm_id, $initial, 0, $shm_size) or die;
+        shmwrite($shm_id, $initial, 0, $shm_size) or die "Could not write to shm: $!";
+        my $val;
+        shmread($shm_id, $val, 0, $shm_size) or die "Could not read from shm: $!";
+        die "Read SHM value does not match the initial value ('$val' vs '$initial')"
+            unless $val eq $initial;
 
         $self->{+IPC_SHM_SIZE} = $shm_size;
         $self->{+IPC_SHM_ID}   = $shm_id;
index f949f1a..28f1506 100644 (file)
@@ -2,7 +2,7 @@ package Test2::API::Stack;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 
 use Test2::Hub();
index 3a2c473..b5bda0f 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Event;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 use Test2::Util::HashBase qw/trace -amnesty/;
 use Test2::Util::ExternalMeta qw/meta get_meta set_meta delete_meta/;
index 4bfc2b8..898a41a 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Event::Bail;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 
 BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
index fc15731..19bd63f 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Event::Diag;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 
 BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
index 6aa8e89..e048799 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Event::Encoding;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 use Carp qw/croak/;
 
index 7a4f44a..8c4f4e3 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Event::Exception;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 
 BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
index 0993b31..ff028ff 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Event::Fail;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 use Test2::EventFacet::Info;
 
index d020217..d1ccbbe 100644 (file)
@@ -5,7 +5,7 @@ use warnings;
 use Carp qw/croak/;
 use Scalar::Util qw/reftype/;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
 use Test2::Util::HashBase;
index 94725a3..d68b258 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Event::Note;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 
 BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
index 3589b53..fc522d4 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Event::Ok;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 
 BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
index 7c51c49..4e76571 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Event::Pass;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 use Test2::EventFacet::Info;
 
index ab34ae3..f782b20 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Event::Plan;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 
 BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
index ac87177..1372ee6 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Event::Skip;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 
 BEGIN { require Test2::Event::Ok; our @ISA = qw(Test2::Event::Ok) }
index 651077d..21a36b5 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Event::Subtest;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 BEGIN { require Test2::Event::Ok; our @ISA = qw(Test2::Event::Ok) }
 use Test2::Util::HashBase qw{subevents buffered subtest_id};
index 7bd3af5..b0f12a6 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Event::TAP::Version;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 use Carp qw/croak/;
 
index 75e6235..f324b6f 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Event::Waiting;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 
 BEGIN { require Test2::Event; our @ISA = qw(Test2::Event) }
index d44086c..51cd667 100644 (file)
@@ -2,7 +2,7 @@ package Test2::EventFacet;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 use Test2::Util::HashBase qw/-details/;
 use Carp qw/croak/;
index fb49b7c..6cec409 100644 (file)
@@ -2,7 +2,7 @@ package Test2::EventFacet::About;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) }
 use Test2::Util::HashBase qw{ -package -no_display };
index 13a767f..c18ab5b 100644 (file)
@@ -2,7 +2,7 @@ package Test2::EventFacet::Amnesty;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 sub is_list { 1 }
 
index 0a62b85..3293c1c 100644 (file)
@@ -2,7 +2,7 @@ package Test2::EventFacet::Assert;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) }
 use Test2::Util::HashBase qw{ -pass -no_debug -number };
index 86cec16..8c44f1d 100644 (file)
@@ -2,7 +2,7 @@ package Test2::EventFacet::Control;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) }
 use Test2::Util::HashBase qw{ -global -terminate -halt -has_callback -encoding };
index 96bed3c..6804b8b 100644 (file)
@@ -2,7 +2,7 @@ package Test2::EventFacet::Error;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 sub facet_key { 'errors' }
 sub is_list { 1 }
index 0be6146..74b77e8 100644 (file)
@@ -2,7 +2,7 @@ package Test2::EventFacet::Info;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 sub is_list { 1 }
 
index a8c5409..7246145 100644 (file)
@@ -2,7 +2,7 @@ package Test2::EventFacet::Meta;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) }
 use vars qw/$AUTOLOAD/;
index 4b23126..403f569 100644 (file)
@@ -2,7 +2,7 @@ package Test2::EventFacet::Parent;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 use Carp qw/confess/;
 
index 6d7d4c5..dd16540 100644 (file)
@@ -2,7 +2,7 @@ package Test2::EventFacet::Plan;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) }
 use Test2::Util::HashBase qw{ -count -skip -none };
index 731aa5c..e42b760 100644 (file)
@@ -2,7 +2,7 @@ package Test2::EventFacet::Trace;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 BEGIN { require Test2::EventFacet; our @ISA = qw(Test2::EventFacet) }
 
index e95f24f..453d1a6 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Formatter;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 
 my %ADDED;
index 75a3f7d..5162c33 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Formatter::TAP;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 use Test2::Util qw/clone_io/;
 
index e8cd270..e644441 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Hub;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 
 use Carp qw/carp croak confess/;
index 168876c..4c7aff2 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Hub::Interceptor;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 
 use Test2::Hub::Interceptor::Terminator();
index 7d11498..d6e0d95 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Hub::Interceptor::Terminator;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 
 1;
index f1532fe..950b955 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Hub::Subtest;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 BEGIN { require Test2::Hub; our @ISA = qw(Test2::Hub) }
 use Test2::Util::HashBase qw/nested exit_code manual_skip_all/;
index a91fac2..9e15afb 100644 (file)
@@ -2,7 +2,7 @@ package Test2::IPC;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 
 use Test2::API::Instance;
index 20a1a4f..bd03371 100644 (file)
@@ -2,7 +2,7 @@ package Test2::IPC::Driver;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 
 use Carp qw/confess/;
index b073dc3..76c3149 100644 (file)
@@ -2,7 +2,7 @@ package Test2::IPC::Driver::Files;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 
 BEGIN { require Test2::IPC::Driver; our @ISA = qw(Test2::IPC::Driver) }
index 4473f2b..20ee127 100644 (file)
@@ -16,7 +16,7 @@ use Test2::API qw/context run_subtest test2_stack/;
 use Test2::Hub::Interceptor();
 use Test2::Hub::Interceptor::Terminator();
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 BEGIN { require Exporter; our @ISA = qw(Exporter) }
 our @EXPORT = qw{
index a6ae792..e2f8a0b 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Util;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 use POSIX();
 use Config qw/%Config/;
index ac2597f..c707510 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Util::ExternalMeta;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 
 use Carp qw/croak/;
index 4696ecb..b677593 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Util::Facets2Legacy;
 use strict;
 use warnings;
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 use Carp qw/croak confess/;
 use Scalar::Util qw/blessed/;
index 138ac2b..f57a7c7 100644 (file)
@@ -2,17 +2,21 @@ package Test2::Util::HashBase;
 use strict;
 use warnings;
 
+our $VERSION = '1.302111';
+
 #################################################################
 #                                                               #
 #  This is a generated file! Do not modify this file directly!  #
 #  Use hashbase_inc.pl script to regenerate this file.          #
 #  The script is part of the Object::HashBase distribution.     #
+#  Note: You can modify the version number above this comment   #
+#  if needed, that is fine.                                     #
 #                                                               #
 #################################################################
 
 {
     no warnings 'once';
-    $Test2::Util::HashBase::VERSION = '0.005';
+    $Test2::Util::HashBase::HB_VERSION = '0.006';
     *Test2::Util::HashBase::ATTR_SUBS = \%Object::HashBase::ATTR_SUBS;
     *Test2::Util::HashBase::ATTR_LIST = \%Object::HashBase::ATTR_LIST;
     *Test2::Util::HashBase::VERSION   = \%Object::HashBase::VERSION;
@@ -50,9 +54,8 @@ sub import {
     my $into  = caller;
 
     # Make sure we list the OLDEST version used to create this class.
-    $Test2::Util::HashBase::VERSION{$into} = $Test2::Util::HashBase::VERSION
-        if !$Test2::Util::HashBase::VERSION{$into}
-        || $Test2::Util::HashBase::VERSION{$into} > $Test2::Util::HashBase::VERSION;
+    my $ver = $Test2::Util::HashBase::HB_VERSION || $Test2::Util::HashBase::VERSION;
+    $Test2::Util::HashBase::VERSION{$into} = $ver if !$Test2::Util::HashBase::VERSION{$into} || $Test2::Util::HashBase::VERSION{$into} > $ver;
 
     my $isa = _isa($into);
     my $attr_list = $Test2::Util::HashBase::ATTR_LIST{$into} ||= [];
index 9a51dc2..ea2d3ec 100644 (file)
@@ -2,7 +2,7 @@ package Test2::Util::Trace;
 require Test2::EventFacet::Trace;
 @ISA = ('Test2::EventFacet::Trace');
 
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 1;
 
index 72add27..55f1389 100644 (file)
@@ -1,5 +1,5 @@
 package ok;
-our $VERSION = '1.302103';
+our $VERSION = '1.302111';
 
 use strict;
 use Test::More ();
index a5bfd15..64019c0 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/perl -w
+# HARNESS-NO-STREAM
 
 BEGIN {
     if( $ENV{PERL_CORE} ) {
index 05d4828..f95671a 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/perl -w
+# HARNESS-NO-STREAM
 
 BEGIN {
     if( $ENV{PERL_CORE} ) {
index 03e0cc4..c356520 100644 (file)
@@ -1,4 +1,5 @@
 use Test::Builder;
+# HARNESS-NO-STREAM
 
 BEGIN {
     if( $ENV{PERL_CORE} ) {
index 3bc4445..94d6244 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/perl -w
+# HARNESS-NO-STREAM
 
 # Test Test::Builder->reset;
 
index 120e3f9..3fdd326 100644 (file)
@@ -1,6 +1,7 @@
 use Test::More;
 use strict;
 use warnings;
+# HARNESS-NO-STREAM
 
 # See https://github.com/Test-More/test-more/issues/789
 
index 97b8f57..87e1a54 100644 (file)
@@ -10,7 +10,7 @@ use File::Spec qw();
 
 my $file = File::Spec->join(dirname(__FILE__), 'tbt_09do_script.pl');
 $file = File::Spec->catfile(File::Spec->curdir(), $file)
-        unless File::Spec->file_name_is_absolute($file);
+    unless File::Spec->file_name_is_absolute($file);
 my $done = do $file;
 ok(defined($done), 'do succeeded') or do {
     if ($@) {
index 6039e4a..1e7b6c9 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/perl
+# HARNESS-NO-STREAM
 
 BEGIN {
     if( $ENV{PERL_CORE} ) {
index ec88e2d..12a80c6 100644 (file)
@@ -5,7 +5,7 @@ use Test::Tester;
 use Data::Dumper qw(Dumper);
 
 my $test = Test::Builder->new;
-$test->plan(tests => 105);
+$test->plan(tests => 139);
 
 my $cap;
 
@@ -95,6 +95,34 @@ my @tests = (
                        depth => 0,
                },
        ],
+    [
+        'pass diag qr',
+        '$cap->ok(1, "pass diag qr");
+        $cap->diag("pass diag qr");',
+        {
+            name => "pass diag qr",
+            ok => 1,
+            actual_ok => 1,
+            reason => "",
+            type => "",
+            diag => qr/pass diag qr/,
+            depth => 0,
+        },
+    ],
+    [
+        'fail diag qr',
+        '$cap->ok(0, "fail diag qr");
+        $cap->diag("fail diag qr");',
+        {
+            name => "fail diag qr",
+            ok => 0,
+            actual_ok => 0,
+            reason => "",
+            type => "",
+            diag => qr/fail diag qr/,
+            depth => 0,
+        },
+    ],
 );
 
 my $big_code = "";
index e32e986..d04fc35 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/perl -w
+# HARNESS-NO-STREAM
 
 # Can't use Test.pm, that's a 5.005 thing.
 package My::Test;
index c697664..defc739 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/perl -w
+# HARNESS-NO-FORK
 
 BEGIN {
     if( $ENV{PERL_CORE} ) {
diff --git a/cpan/Test-Simple/t/Legacy_And_Test2/diag_event_on_ok.t b/cpan/Test-Simple/t/Legacy_And_Test2/diag_event_on_ok.t
new file mode 100644 (file)
index 0000000..ec904fb
--- /dev/null
@@ -0,0 +1,21 @@
+use strict;
+use warnings;
+
+use Test2::Tools::Tiny;
+use Test2::API qw/intercept/;
+use Test::More ();
+
+my $events = intercept {
+    Test::More::ok(0, 'name');
+};
+
+my ($ok, $diag) = @$events;
+
+ok($ok->isa('Test2::Event::Ok'), "got 'ok' result");
+is($ok->pass, 0, "'ok' test failed");
+is($ok->name, 'name', "got 'ok' name");
+
+ok($diag->isa('Test2::Event::Diag'), "got 'ok' result");
+is($diag->message, "  Failed test 'name'\n  at $0 line 9.\n", "got all diag message in one diag event");
+
+done_testing;
index 09c9a83..82a1f8f 100644 (file)
@@ -1,14 +1,23 @@
 use strict;
 use warnings;
 
-BEGIN {
-    eval { require threads; };
-}
+# The things done in this test can trigger a buggy return value on some
+# platforms. This prevents that. The harness should catch actual failures. If
+# no harness is active then we will NOT sanitize the exit value, false fails ar
+# ebetter than false passes.
+END { $? = 0 if $ENV{HARNESS_ACTIVE} }
+
+BEGIN { local ($@, $?, $!); eval { require threads } }
 use Test2::Tools::Tiny;
 use Test2::Util qw/CAN_THREAD CAN_REALLY_FORK/;
 use Test2::IPC;
 use Test2::API qw/test2_ipc_set_timeout test2_ipc_get_timeout/;
 
+my $plan = 2;
+$plan += 2 if CAN_REALLY_FORK;
+$plan += 2 if CAN_THREAD;
+plan $plan;
+
 is(test2_ipc_get_timeout(), 30, "got default timeout");
 test2_ipc_set_timeout(10);
 is(test2_ipc_get_timeout(), 10, "hanged the timeout");
@@ -69,5 +78,3 @@ if (CAN_THREAD) {
     close($tpiper);
     close($tpipew);
 }
-
-done_testing;
index 18b78e7..10ba6eb 100644 (file)
@@ -132,11 +132,11 @@ ok($one->finalized, "calling format finalized the object");
     is($one->formatter, 'Test2::Formatter::TAP', "got specified formatter");
     ok($one->finalized, "calling format finalized the object");
 
-    local $ENV{T2_FORMATTER} = '+Fake';
+    local $ENV{T2_FORMATTER} = '+A::Fake::Module::That::Should::Not::Exist';
     $one->reset;
     like(
         exception { $one->formatter },
-        qr/COULD NOT LOAD FORMATTER 'Fake' \(set by the 'T2_FORMATTER' environment variable\)/,
+        qr/COULD NOT LOAD FORMATTER 'A::Fake::Module::That::Should::Not::Exist' \(set by the 'T2_FORMATTER' environment variable\)/,
         "Bad formatter"
     );
 }
index 666d929..c53fae4 100644 (file)
@@ -253,6 +253,10 @@ To address a security vulnerability in older versions of the 'zlib' library
 (which is bundled with Compress-Raw-Zlib), L<Compress::Raw::Zlib> has been
 upgraded to CPAN version 2.075.
 
+=item *
+
+L<Test::Simple> has been upgraded from version 1.302103 to 1.302111.
+
 =back
 
 =head2 Removed Modules and Pragmata