In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/232cf712936e33115702abd2b98371391abe2640?hp=dd5d1b89ddcc8c8643e05c21ab2e0b2a20a8f4b1>

- Log -----------------------------------------------------------------
commit 232cf712936e33115702abd2b98371391abe2640
Author: Chad Granum <[email protected]>
Date:   Mon Dec 15 03:09:12 2014 +0100

    Test-Simple Version Bump, 1.301001_090 (RC10)
-----------------------------------------------------------------------

Summary of changes:
 cpan/Test-Simple/lib/Test/Builder.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/More.pm                 |  2 +-
 cpan/Test-Simple/lib/Test/Simple.pm               |  4 +--
 cpan/Test-Simple/lib/Test/Stream.pm               |  2 +-
 cpan/Test-Simple/lib/Test/Stream/Event/Subtest.pm |  6 ++++
 cpan/Test-Simple/lib/Test/Stream/Subtest.pm       |  2 ++
 cpan/Test-Simple/lib/Test/Tester.pm               |  2 +-
 cpan/Test-Simple/lib/Test/use/ok.pm               |  2 +-
 cpan/Test-Simple/lib/ok.pm                        |  2 +-
 cpan/Test-Simple/t/Behavior/subtest_die.t         | 35 +++++++++++++++++++++++
 13 files changed, 54 insertions(+), 11 deletions(-)
 create mode 100644 cpan/Test-Simple/t/Behavior/subtest_die.t

diff --git a/cpan/Test-Simple/lib/Test/Builder.pm 
b/cpan/Test-Simple/lib/Test/Builder.pm
index 05ac575..099d389 100644
--- a/cpan/Test-Simple/lib/Test/Builder.pm
+++ b/cpan/Test-Simple/lib/Test/Builder.pm
@@ -4,7 +4,7 @@ use 5.008001;
 use strict;
 use warnings;
 
-our $VERSION = '1.301001_089';
+our $VERSION = '1.301001_090';
 $VERSION = eval $VERSION;    ## no critic 
(BuiltinFunctions::ProhibitStringyEval)
 
 
diff --git a/cpan/Test-Simple/lib/Test/Builder/Module.pm 
b/cpan/Test-Simple/lib/Test/Builder/Module.pm
index ebc4d20..c5baa2c 100644
--- a/cpan/Test-Simple/lib/Test/Builder/Module.pm
+++ b/cpan/Test-Simple/lib/Test/Builder/Module.pm
@@ -8,7 +8,7 @@ use Test::Builder 0.99;
 require Exporter;
 our @ISA = qw(Exporter);
 
-our $VERSION = '1.301001_089';
+our $VERSION = '1.301001_090';
 $VERSION = eval $VERSION;      ## no critic 
(BuiltinFunctions::ProhibitStringyEval)
 
 
diff --git a/cpan/Test-Simple/lib/Test/Builder/Tester.pm 
b/cpan/Test-Simple/lib/Test/Builder/Tester.pm
index 53ec73b..688dace 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.301001_089';
+our $VERSION = '1.301001_090';
 $VERSION = eval $VERSION;    ## no critic 
(BuiltinFunctions::ProhibitStringyEval)
 
 use Test::Stream 1.301001 '-internal';
diff --git a/cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm 
b/cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm
index ffc79cf..f8646b5 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.301001_089';
+our $VERSION = '1.301001_090';
 $VERSION = eval $VERSION;    ## no critic 
(BuiltinFunctions::ProhibitStringyEval)
 
 use Test::Stream 1.301001 '-internal';
diff --git a/cpan/Test-Simple/lib/Test/More.pm 
b/cpan/Test-Simple/lib/Test/More.pm
index 3c6b0e6..5744c22 100644
--- a/cpan/Test-Simple/lib/Test/More.pm
+++ b/cpan/Test-Simple/lib/Test/More.pm
@@ -4,7 +4,7 @@ use 5.008001;
 use strict;
 use warnings;
 
-our $VERSION = '1.301001_089';
+our $VERSION = '1.301001_090';
 $VERSION = eval $VERSION;    ## no critic 
(BuiltinFunctions::ProhibitStringyEval)
 
 use Test::Stream 1.301001 '-internal';
diff --git a/cpan/Test-Simple/lib/Test/Simple.pm 
b/cpan/Test-Simple/lib/Test/Simple.pm
index 3427368..4da7713 100644
--- a/cpan/Test-Simple/lib/Test/Simple.pm
+++ b/cpan/Test-Simple/lib/Test/Simple.pm
@@ -5,10 +5,10 @@ use 5.008001;
 use strict;
 use warnings;
 
-our $VERSION = '1.301001_089';
+our $VERSION = '1.301001_090';
 $VERSION = eval $VERSION;    ## no critic 
(BuiltinFunctions::ProhibitStringyEval)
 
-use Test::Stream 1.301001_089 '-internal';
+use Test::Stream 1.301001_090 '-internal';
 use Test::Stream::Toolset;
 
 use Test::Stream::Exporter;
diff --git a/cpan/Test-Simple/lib/Test/Stream.pm 
b/cpan/Test-Simple/lib/Test/Stream.pm
index d775edb..1558eb0 100644
--- a/cpan/Test-Simple/lib/Test/Stream.pm
+++ b/cpan/Test-Simple/lib/Test/Stream.pm
@@ -2,7 +2,7 @@ package Test::Stream;
 use strict;
 use warnings;
 
-our $VERSION = '1.301001_089';
+our $VERSION = '1.301001_090';
 $VERSION = eval $VERSION;    ## no critic 
(BuiltinFunctions::ProhibitStringyEval)
 
 use Test::Stream::Context qw/context/;
diff --git a/cpan/Test-Simple/lib/Test/Stream/Event/Subtest.pm 
b/cpan/Test-Simple/lib/Test/Stream/Event/Subtest.pm
index 4557796..f29636a 100644
--- a/cpan/Test-Simple/lib/Test/Stream/Event/Subtest.pm
+++ b/cpan/Test-Simple/lib/Test/Stream/Event/Subtest.pm
@@ -21,6 +21,12 @@ sub subevents {
 sub init {
     my $self = shift;
 
+    if ($self->[EXCEPTION] && !(blessed($self->[EXCEPTION]) && 
$self->[EXCEPTION]->isa('Test::Stream::Event'))) {
+        push @{$self->[DIAG]} => "Exception in subtest '$self->[NAME]': 
$self->[EXCEPTION]";
+        $self->[STATE]->[STATE_PASSING] = 0;
+        $self->[BOOL] = 0;
+    }
+
     $self->[REAL_BOOL] = $self->[STATE]->[STATE_PASSING] && 
$self->[STATE]->[STATE_COUNT];
     $self->[EVENTS] ||= [];
 
diff --git a/cpan/Test-Simple/lib/Test/Stream/Subtest.pm 
b/cpan/Test-Simple/lib/Test/Stream/Subtest.pm
index 4540758..39533e4 100644
--- a/cpan/Test-Simple/lib/Test/Stream/Subtest.pm
+++ b/cpan/Test-Simple/lib/Test/Stream/Subtest.pm
@@ -62,6 +62,8 @@ This is almost certainly not what you wanted. Did you fork 
and forget to exit?
 
     $ctx->set;
     $ctx->restore_todo($todo);
+    $ctx->stream->subtest_exception->[-1] = $err unless $succ;
+
     # This sends the subtest event
     my $st = $ctx->child('pop', $name);
 
diff --git a/cpan/Test-Simple/lib/Test/Tester.pm 
b/cpan/Test-Simple/lib/Test/Tester.pm
index 2f67eda..072ea77 100644
--- a/cpan/Test-Simple/lib/Test/Tester.pm
+++ b/cpan/Test-Simple/lib/Test/Tester.pm
@@ -16,7 +16,7 @@ require Exporter;
 
 use vars qw( @ISA @EXPORT $VERSION );
 
-our $VERSION = '1.301001_089';
+our $VERSION = '1.301001_090';
 $VERSION = eval $VERSION;    ## no critic 
(BuiltinFunctions::ProhibitStringyEval)
 
 @EXPORT  = qw( run_tests check_tests check_test cmp_results show_space );
diff --git a/cpan/Test-Simple/lib/Test/use/ok.pm 
b/cpan/Test-Simple/lib/Test/use/ok.pm
index cd2698e..27d4721 100644
--- a/cpan/Test-Simple/lib/Test/use/ok.pm
+++ b/cpan/Test-Simple/lib/Test/use/ok.pm
@@ -3,7 +3,7 @@ use strict;
 use warnings;
 use 5.005;
 
-our $VERSION = '1.301001_089';
+our $VERSION = '1.301001_090';
 $VERSION = eval $VERSION;    ## no critic 
(BuiltinFunctions::ProhibitStringyEval)
 
 use Test::Stream 1.301001 '-internal';
diff --git a/cpan/Test-Simple/lib/ok.pm b/cpan/Test-Simple/lib/ok.pm
index c757203..db4995a 100644
--- a/cpan/Test-Simple/lib/ok.pm
+++ b/cpan/Test-Simple/lib/ok.pm
@@ -6,7 +6,7 @@ use Test::Stream 1.301001 '-internal';
 use Test::More 1.301001 ();
 use Test::Stream::Carp qw/croak/;
 
-our $VERSION = '1.301001_089';
+our $VERSION = '1.301001_090';
 $VERSION = eval $VERSION;    ## no critic 
(BuiltinFunctions::ProhibitStringyEval)
 
 sub import {
diff --git a/cpan/Test-Simple/t/Behavior/subtest_die.t 
b/cpan/Test-Simple/t/Behavior/subtest_die.t
new file mode 100644
index 0000000..49f8f88
--- /dev/null
+++ b/cpan/Test-Simple/t/Behavior/subtest_die.t
@@ -0,0 +1,35 @@
+use strict;
+use warnings;
+use Test::More;
+
+use Test::Stream::Tester;
+
+my ($ok, $err);
+events_are(
+    intercept {
+        $ok = eval {
+            subtest foo => sub {
+                ok(1, "Pass");
+                die "Ooops";
+            };
+            1;
+        };
+        $err = $@;
+    },
+    check {
+        directive seek => 1;
+        event subtest => {
+            bool => 0,
+            real_bool => 0,
+            name => 'foo',
+            exception => qr/^Ooops/,
+        };
+        directive 'end';
+    },
+    "Subtest fails if it throws an exception"
+);
+
+ok(!$ok, "subtest died");
+like($err, qr/^Ooops/, "Got expected exception");
+
+done_testing;

--
Perl5 Master Repository

Reply via email to