Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.98k stars 559 forks source link

perl blead: Update to Test-Simple Alpha 069 [patch] #14198

Closed p5pRT closed 10 years ago

p5pRT commented 10 years ago

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

Searchable as RT123095$

p5pRT commented 10 years ago

From @exodist

I have updated the Test-Simple alpha once more.

Please see attached patch.

Bugfixes for cpan modules the alphas broke\, mainly. Also some doc updates.

Thanks!

p5pRT commented 10 years ago

From @exodist

0001-Update-to-Test-Simple-alpha-069.patch ```diff From d1efd565c4061de0c6e17ba1c11eb1c3037e39a3 Mon Sep 17 00:00:00 2001 From: Chad Granum Date: Fri, 31 Oct 2014 15:17:01 -0700 Subject: [PATCH] Update to Test::Simple alpha 069 Fix some minor bugs effecting a couple cpan modules Some doc updates --- MANIFEST | 2 ++ cpan/Test-Simple/lib/Test/Builder.pm | 5 ++++- 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/More/DeepCheck/Strict.pm | 2 +- cpan/Test-Simple/lib/Test/More/DeepCheck/Tolerant.pm | 2 +- cpan/Test-Simple/lib/Test/More/Tools.pm | 2 +- cpan/Test-Simple/lib/Test/Simple.pm | 2 +- cpan/Test-Simple/lib/Test/Stream.pm | 4 ++-- cpan/Test-Simple/lib/Test/Stream/Tester.pm | 2 +- cpan/Test-Simple/lib/Test/Stream/Tester/Checks.pm | 2 +- cpan/Test-Simple/lib/Test/Stream/Tester/Checks/Event.pm | 4 ++-- 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/388-threadedsubtest.load | 3 +++ cpan/Test-Simple/t/Behavior/388-threadedsubtest.t | 15 +++++++++++++++ 19 files changed, 41 insertions(+), 18 deletions(-) create mode 100644 cpan/Test-Simple/t/Behavior/388-threadedsubtest.load create mode 100644 cpan/Test-Simple/t/Behavior/388-threadedsubtest.t diff --git a/MANIFEST b/MANIFEST index 1c2467b..356a73f 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2296,6 +2296,8 @@ cpan/Test-Simple/lib/Test/Tutorial.pod Test::Simple documentation cpan/Test-Simple/lib/Test/Tutorial/WritingTests.pod Test::Simple documentation cpan/Test-Simple/lib/Test/Tutorial/WritingTools.pod Test::Simple documentation cpan/Test-Simple/lib/Test/use/ok.pm Test::Simple library +cpan/Test-Simple/t/Behavior/388-threadedsubtest.load Test::Simple Test +cpan/Test-Simple/t/Behavior/388-threadedsubtest.t Test::Simple test cpan/Test-Simple/t/Behavior/cmp_ok_xor.t Test::Simple Test cpan/Test-Simple/t/Behavior/encoding_test.t Test::Simple Test cpan/Test-Simple/t/Behavior/fork_new_end.t Test::Simple Test diff --git a/cpan/Test-Simple/lib/Test/Builder.pm b/cpan/Test-Simple/lib/Test/Builder.pm index 5cc66c2..e15b11a 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_068'; +our $VERSION = '1.301001_069'; $VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval) use Test::More::Tools; @@ -265,6 +265,9 @@ sub todo { sub in_todo { my $self = shift; + my $ctx = $self->ctx; + return 1 if $ctx->in_todo; + return (defined $self->{Todo} || $self->find_TODO) ? 1 : 0; } diff --git a/cpan/Test-Simple/lib/Test/Builder/Module.pm b/cpan/Test-Simple/lib/Test/Builder/Module.pm index 6705348..54bbe07 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 0.99; require Exporter; our @ISA = qw(Exporter); -our $VERSION = '1.301001_068'; +our $VERSION = '1.301001_069'; $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 df4788f..01e9854 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_068'; +our $VERSION = '1.301001_069'; $VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval) use Test::Builder 1.301001; diff --git a/cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm b/cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm index fdbcf2d..e483fcb 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_068'; +our $VERSION = '1.301001_069'; $VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval) require Test::Builder::Tester; diff --git a/cpan/Test-Simple/lib/Test/More.pm b/cpan/Test-Simple/lib/Test/More.pm index 70e8e98..8b683f7 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_068'; +our $VERSION = '1.301001_069'; $VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval) use Test::Stream::Carp qw/croak carp/; diff --git a/cpan/Test-Simple/lib/Test/More/DeepCheck/Strict.pm b/cpan/Test-Simple/lib/Test/More/DeepCheck/Strict.pm index e019d4e..d50e980 100644 --- a/cpan/Test-Simple/lib/Test/More/DeepCheck/Strict.pm +++ b/cpan/Test-Simple/lib/Test/More/DeepCheck/Strict.pm @@ -128,7 +128,7 @@ sub _inner_check { return $self->_check_array($e1, $e2) if $type1 eq 'ARRAY'; return $self->_check_hash($e1, $e2) if $type1 eq 'HASH'; - if ($type1 eq 'REF' || $type1 eq 'SCALAR' && !(is_regex($e1) && is_regex($e2))) { + if ($type1 eq 'REF' || $type1 eq 'SCALAR' && !(defined(is_regex($e1)) && defined(is_regex($e2)))) { push @$self => {type => 'REF', vals => [$e1, $e2], line => __LINE__}; my $ok = $self->_deep_check($$e1, $$e2); pop @$self if $ok; diff --git a/cpan/Test-Simple/lib/Test/More/DeepCheck/Tolerant.pm b/cpan/Test-Simple/lib/Test/More/DeepCheck/Tolerant.pm index 2ae8311..ef3fb45 100644 --- a/cpan/Test-Simple/lib/Test/More/DeepCheck/Tolerant.pm +++ b/cpan/Test-Simple/lib/Test/More/DeepCheck/Tolerant.pm @@ -39,7 +39,7 @@ sub _reftype { return $type unless $type eq 'SCALAR'; - $type = 'REGEXP' if $type eq 'REGEX' || is_regex($thing); + $type = 'REGEXP' if $type eq 'REGEX' || defined is_regex($thing); return $type; } diff --git a/cpan/Test-Simple/lib/Test/More/Tools.pm b/cpan/Test-Simple/lib/Test/More/Tools.pm index 69074ce..7357f35 100644 --- a/cpan/Test-Simple/lib/Test/More/Tools.pm +++ b/cpan/Test-Simple/lib/Test/More/Tools.pm @@ -124,7 +124,7 @@ sub regex_check { my $regex = is_regex($got_regex); return (0, " '$got_regex' doesn't look much like a regex to me.") - unless $regex; + unless defined $regex; my $ctx = context(); my ($p, $file, $line) = $ctx->call; diff --git a/cpan/Test-Simple/lib/Test/Simple.pm b/cpan/Test-Simple/lib/Test/Simple.pm index b26ffd7..0a1b507 100644 --- a/cpan/Test-Simple/lib/Test/Simple.pm +++ b/cpan/Test-Simple/lib/Test/Simple.pm @@ -5,7 +5,7 @@ use 5.008001; use strict; use warnings; -our $VERSION = '1.301001_068'; +our $VERSION = '1.301001_069'; $VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval) use Test::Stream '-internal'; diff --git a/cpan/Test-Simple/lib/Test/Stream.pm b/cpan/Test-Simple/lib/Test/Stream.pm index fb616f0..bd65e06 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_068'; +our $VERSION = '1.301001_069'; $VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval) use Test::Stream::Threads; @@ -725,7 +725,7 @@ Show events as they happen, then also display them after. =item 'enable_fork' -Turns on support for code that forks. This is nto activated by default because +Turns on support for code that forks. This is not activated by default because it adds ~30ms to the Test::More compile-time, which can really add up in large test suites. Turn it on only when needed. diff --git a/cpan/Test-Simple/lib/Test/Stream/Tester.pm b/cpan/Test-Simple/lib/Test/Stream/Tester.pm index f8ebb7c..80e45bd 100644 --- a/cpan/Test-Simple/lib/Test/Stream/Tester.pm +++ b/cpan/Test-Simple/lib/Test/Stream/Tester.pm @@ -4,7 +4,7 @@ use warnings; use Test::Builder 1.301001; use Test::Stream; -use Test::Stream::Util qw/try is_regex/; +use Test::Stream::Util qw/try/; use B; diff --git a/cpan/Test-Simple/lib/Test/Stream/Tester/Checks.pm b/cpan/Test-Simple/lib/Test/Stream/Tester/Checks.pm index b441d9d..9321fe8 100644 --- a/cpan/Test-Simple/lib/Test/Stream/Tester/Checks.pm +++ b/cpan/Test-Simple/lib/Test/Stream/Tester/Checks.pm @@ -109,7 +109,7 @@ sub vtype { return 'event' if $v->isa('Test::Stream::Tester::Events::Event'); } - return 'regexp' if is_regex($v); + return 'regexp' if defined is_regex($v); return 'noref' unless ref $v; return 'array' if reftype($v) eq 'ARRAY'; return 'code' if reftype($v) eq 'CODE'; diff --git a/cpan/Test-Simple/lib/Test/Stream/Tester/Checks/Event.pm b/cpan/Test-Simple/lib/Test/Stream/Tester/Checks/Event.pm index 91341a1..84517aa 100644 --- a/cpan/Test-Simple/lib/Test/Stream/Tester/Checks/Event.pm +++ b/cpan/Test-Simple/lib/Test/Stream/Tester/Checks/Event.pm @@ -60,7 +60,7 @@ sub validate_check { return unless defined $val; return unless ref $val; - return if is_regex($val); + return if defined is_regex($val); if (blessed($val)) { return if $val->isa('Test::Stream::Tester::Checks'); @@ -76,7 +76,7 @@ sub validate_check { unless reftype($val) eq 'ARRAY'; croak "Arrayrefs given as field checks may only contain regexes" - if grep { !is_regex($_) } @$val; + if grep { ! defined is_regex($_) } @$val; return; } diff --git a/cpan/Test-Simple/lib/Test/Tester.pm b/cpan/Test-Simple/lib/Test/Tester.pm index 6f0edad..1fb99d0 100644 --- a/cpan/Test-Simple/lib/Test/Tester.pm +++ b/cpan/Test-Simple/lib/Test/Tester.pm @@ -15,7 +15,7 @@ require Exporter; use vars qw( @ISA @EXPORT $VERSION ); -our $VERSION = '1.301001_068'; +our $VERSION = '1.301001_069'; $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 a5b4aab..a62ba82 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_068'; +our $VERSION = '1.301001_069'; $VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval) 1; diff --git a/cpan/Test-Simple/lib/ok.pm b/cpan/Test-Simple/lib/ok.pm index 927b006..38a8542 100644 --- a/cpan/Test-Simple/lib/ok.pm +++ b/cpan/Test-Simple/lib/ok.pm @@ -5,7 +5,7 @@ use warnings; use Test::More 1.301001 (); use Test::Stream::Carp qw/croak/; -our $VERSION = '1.301001_068'; +our $VERSION = '1.301001_069'; $VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval) sub import { diff --git a/cpan/Test-Simple/t/Behavior/388-threadedsubtest.load b/cpan/Test-Simple/t/Behavior/388-threadedsubtest.load new file mode 100644 index 0000000..ee34125 --- /dev/null +++ b/cpan/Test-Simple/t/Behavior/388-threadedsubtest.load @@ -0,0 +1,3 @@ +use Test::More; +ok(1,"name"); +done_testing; diff --git a/cpan/Test-Simple/t/Behavior/388-threadedsubtest.t b/cpan/Test-Simple/t/Behavior/388-threadedsubtest.t new file mode 100644 index 0000000..eeedb18 --- /dev/null +++ b/cpan/Test-Simple/t/Behavior/388-threadedsubtest.t @@ -0,0 +1,15 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use threads; +use Test::More; + +subtest my_subtest => sub { + my $file = __FILE__; + $file =~ s/\.t$/.load/; + do $file || die $@; +}; + +done_testing; -- 1.9.1 ```
p5pRT commented 10 years ago

From @exodist

Scratch that\, this is broken on unthreaded perls :-(

New patch shortly

On Fri Oct 31 15​:34​:35 2014\, exodist7@​gmail.com wrote​:

I have updated the Test-Simple alpha once more.

Please see attached patch.

Bugfixes for cpan modules the alphas broke\, mainly. Also some doc updates.

Thanks!

p5pRT commented 10 years ago

From @exodist

Here we go.

p5pRT commented 10 years ago

From @exodist

0001-Update-Test-Simple-to-alpha-070.patch ```diff From 46ed0fe8ffbb87ade6d5f8eb2e0018cff6364649 Mon Sep 17 00:00:00 2001 From: Chad Granum Date: Fri, 31 Oct 2014 15:43:23 -0700 Subject: [PATCH] Update Test-Simple to alpha 070 Fix thread issue from 069 --- MANIFEST | 2 ++ cpan/Test-Simple/lib/Test/Builder.pm | 5 ++- 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/More/DeepCheck/Strict.pm | 2 +- .../lib/Test/More/DeepCheck/Tolerant.pm | 2 +- cpan/Test-Simple/lib/Test/More/Tools.pm | 2 +- cpan/Test-Simple/lib/Test/Simple.pm | 2 +- cpan/Test-Simple/lib/Test/Stream.pm | 4 +-- cpan/Test-Simple/lib/Test/Stream/Tester.pm | 2 +- cpan/Test-Simple/lib/Test/Stream/Tester/Checks.pm | 2 +- .../lib/Test/Stream/Tester/Checks/Event.pm | 4 +-- cpan/Test-Simple/lib/Test/Tester.pm | 2 +- cpan/Test-Simple/lib/Test/use/ok.pm | 2 +- cpan/Test-Simple/lib/ok.pm | 2 +- .../t/Behavior/388-threadedsubtest.load | 3 ++ cpan/Test-Simple/t/Behavior/388-threadedsubtest.t | 38 ++++++++++++++++++++++ 19 files changed, 64 insertions(+), 18 deletions(-) create mode 100644 cpan/Test-Simple/t/Behavior/388-threadedsubtest.load create mode 100644 cpan/Test-Simple/t/Behavior/388-threadedsubtest.t diff --git a/MANIFEST b/MANIFEST index 1c2467b..356a73f 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2296,6 +2296,8 @@ cpan/Test-Simple/lib/Test/Tutorial.pod Test::Simple documentation cpan/Test-Simple/lib/Test/Tutorial/WritingTests.pod Test::Simple documentation cpan/Test-Simple/lib/Test/Tutorial/WritingTools.pod Test::Simple documentation cpan/Test-Simple/lib/Test/use/ok.pm Test::Simple library +cpan/Test-Simple/t/Behavior/388-threadedsubtest.load Test::Simple Test +cpan/Test-Simple/t/Behavior/388-threadedsubtest.t Test::Simple test cpan/Test-Simple/t/Behavior/cmp_ok_xor.t Test::Simple Test cpan/Test-Simple/t/Behavior/encoding_test.t Test::Simple Test cpan/Test-Simple/t/Behavior/fork_new_end.t Test::Simple Test diff --git a/cpan/Test-Simple/lib/Test/Builder.pm b/cpan/Test-Simple/lib/Test/Builder.pm index 5cc66c2..3ac9dff 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_068'; +our $VERSION = '1.301001_070'; $VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval) use Test::More::Tools; @@ -265,6 +265,9 @@ sub todo { sub in_todo { my $self = shift; + my $ctx = $self->ctx; + return 1 if $ctx->in_todo; + return (defined $self->{Todo} || $self->find_TODO) ? 1 : 0; } diff --git a/cpan/Test-Simple/lib/Test/Builder/Module.pm b/cpan/Test-Simple/lib/Test/Builder/Module.pm index 6705348..1409f95 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 0.99; require Exporter; our @ISA = qw(Exporter); -our $VERSION = '1.301001_068'; +our $VERSION = '1.301001_070'; $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 df4788f..98c6305 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_068'; +our $VERSION = '1.301001_070'; $VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval) use Test::Builder 1.301001; diff --git a/cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm b/cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm index fdbcf2d..fef22cd 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_068'; +our $VERSION = '1.301001_070'; $VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval) require Test::Builder::Tester; diff --git a/cpan/Test-Simple/lib/Test/More.pm b/cpan/Test-Simple/lib/Test/More.pm index 70e8e98..ec7978a 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_068'; +our $VERSION = '1.301001_070'; $VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval) use Test::Stream::Carp qw/croak carp/; diff --git a/cpan/Test-Simple/lib/Test/More/DeepCheck/Strict.pm b/cpan/Test-Simple/lib/Test/More/DeepCheck/Strict.pm index e019d4e..d50e980 100644 --- a/cpan/Test-Simple/lib/Test/More/DeepCheck/Strict.pm +++ b/cpan/Test-Simple/lib/Test/More/DeepCheck/Strict.pm @@ -128,7 +128,7 @@ sub _inner_check { return $self->_check_array($e1, $e2) if $type1 eq 'ARRAY'; return $self->_check_hash($e1, $e2) if $type1 eq 'HASH'; - if ($type1 eq 'REF' || $type1 eq 'SCALAR' && !(is_regex($e1) && is_regex($e2))) { + if ($type1 eq 'REF' || $type1 eq 'SCALAR' && !(defined(is_regex($e1)) && defined(is_regex($e2)))) { push @$self => {type => 'REF', vals => [$e1, $e2], line => __LINE__}; my $ok = $self->_deep_check($$e1, $$e2); pop @$self if $ok; diff --git a/cpan/Test-Simple/lib/Test/More/DeepCheck/Tolerant.pm b/cpan/Test-Simple/lib/Test/More/DeepCheck/Tolerant.pm index 2ae8311..ef3fb45 100644 --- a/cpan/Test-Simple/lib/Test/More/DeepCheck/Tolerant.pm +++ b/cpan/Test-Simple/lib/Test/More/DeepCheck/Tolerant.pm @@ -39,7 +39,7 @@ sub _reftype { return $type unless $type eq 'SCALAR'; - $type = 'REGEXP' if $type eq 'REGEX' || is_regex($thing); + $type = 'REGEXP' if $type eq 'REGEX' || defined is_regex($thing); return $type; } diff --git a/cpan/Test-Simple/lib/Test/More/Tools.pm b/cpan/Test-Simple/lib/Test/More/Tools.pm index 69074ce..7357f35 100644 --- a/cpan/Test-Simple/lib/Test/More/Tools.pm +++ b/cpan/Test-Simple/lib/Test/More/Tools.pm @@ -124,7 +124,7 @@ sub regex_check { my $regex = is_regex($got_regex); return (0, " '$got_regex' doesn't look much like a regex to me.") - unless $regex; + unless defined $regex; my $ctx = context(); my ($p, $file, $line) = $ctx->call; diff --git a/cpan/Test-Simple/lib/Test/Simple.pm b/cpan/Test-Simple/lib/Test/Simple.pm index b26ffd7..0d8c183 100644 --- a/cpan/Test-Simple/lib/Test/Simple.pm +++ b/cpan/Test-Simple/lib/Test/Simple.pm @@ -5,7 +5,7 @@ use 5.008001; use strict; use warnings; -our $VERSION = '1.301001_068'; +our $VERSION = '1.301001_070'; $VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval) use Test::Stream '-internal'; diff --git a/cpan/Test-Simple/lib/Test/Stream.pm b/cpan/Test-Simple/lib/Test/Stream.pm index fb616f0..d0437b0 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_068'; +our $VERSION = '1.301001_070'; $VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval) use Test::Stream::Threads; @@ -725,7 +725,7 @@ Show events as they happen, then also display them after. =item 'enable_fork' -Turns on support for code that forks. This is nto activated by default because +Turns on support for code that forks. This is not activated by default because it adds ~30ms to the Test::More compile-time, which can really add up in large test suites. Turn it on only when needed. diff --git a/cpan/Test-Simple/lib/Test/Stream/Tester.pm b/cpan/Test-Simple/lib/Test/Stream/Tester.pm index f8ebb7c..80e45bd 100644 --- a/cpan/Test-Simple/lib/Test/Stream/Tester.pm +++ b/cpan/Test-Simple/lib/Test/Stream/Tester.pm @@ -4,7 +4,7 @@ use warnings; use Test::Builder 1.301001; use Test::Stream; -use Test::Stream::Util qw/try is_regex/; +use Test::Stream::Util qw/try/; use B; diff --git a/cpan/Test-Simple/lib/Test/Stream/Tester/Checks.pm b/cpan/Test-Simple/lib/Test/Stream/Tester/Checks.pm index b441d9d..9321fe8 100644 --- a/cpan/Test-Simple/lib/Test/Stream/Tester/Checks.pm +++ b/cpan/Test-Simple/lib/Test/Stream/Tester/Checks.pm @@ -109,7 +109,7 @@ sub vtype { return 'event' if $v->isa('Test::Stream::Tester::Events::Event'); } - return 'regexp' if is_regex($v); + return 'regexp' if defined is_regex($v); return 'noref' unless ref $v; return 'array' if reftype($v) eq 'ARRAY'; return 'code' if reftype($v) eq 'CODE'; diff --git a/cpan/Test-Simple/lib/Test/Stream/Tester/Checks/Event.pm b/cpan/Test-Simple/lib/Test/Stream/Tester/Checks/Event.pm index 91341a1..84517aa 100644 --- a/cpan/Test-Simple/lib/Test/Stream/Tester/Checks/Event.pm +++ b/cpan/Test-Simple/lib/Test/Stream/Tester/Checks/Event.pm @@ -60,7 +60,7 @@ sub validate_check { return unless defined $val; return unless ref $val; - return if is_regex($val); + return if defined is_regex($val); if (blessed($val)) { return if $val->isa('Test::Stream::Tester::Checks'); @@ -76,7 +76,7 @@ sub validate_check { unless reftype($val) eq 'ARRAY'; croak "Arrayrefs given as field checks may only contain regexes" - if grep { !is_regex($_) } @$val; + if grep { ! defined is_regex($_) } @$val; return; } diff --git a/cpan/Test-Simple/lib/Test/Tester.pm b/cpan/Test-Simple/lib/Test/Tester.pm index 6f0edad..4234b62 100644 --- a/cpan/Test-Simple/lib/Test/Tester.pm +++ b/cpan/Test-Simple/lib/Test/Tester.pm @@ -15,7 +15,7 @@ require Exporter; use vars qw( @ISA @EXPORT $VERSION ); -our $VERSION = '1.301001_068'; +our $VERSION = '1.301001_070'; $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 a5b4aab..2055d81 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_068'; +our $VERSION = '1.301001_070'; $VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval) 1; diff --git a/cpan/Test-Simple/lib/ok.pm b/cpan/Test-Simple/lib/ok.pm index 927b006..d1a54c4 100644 --- a/cpan/Test-Simple/lib/ok.pm +++ b/cpan/Test-Simple/lib/ok.pm @@ -5,7 +5,7 @@ use warnings; use Test::More 1.301001 (); use Test::Stream::Carp qw/croak/; -our $VERSION = '1.301001_068'; +our $VERSION = '1.301001_070'; $VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval) sub import { diff --git a/cpan/Test-Simple/t/Behavior/388-threadedsubtest.load b/cpan/Test-Simple/t/Behavior/388-threadedsubtest.load new file mode 100644 index 0000000..ee34125 --- /dev/null +++ b/cpan/Test-Simple/t/Behavior/388-threadedsubtest.load @@ -0,0 +1,3 @@ +use Test::More; +ok(1,"name"); +done_testing; diff --git a/cpan/Test-Simple/t/Behavior/388-threadedsubtest.t b/cpan/Test-Simple/t/Behavior/388-threadedsubtest.t new file mode 100644 index 0000000..44a586c --- /dev/null +++ b/cpan/Test-Simple/t/Behavior/388-threadedsubtest.t @@ -0,0 +1,38 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use Config; + +BEGIN { + if ($] == 5.010000) { + print "1..0 # Threads are broken on 5.10.0\n"; + exit 0; + } + + my $works = 1; + $works &&= $] >= 5.008001; + $works &&= $Config{'useithreads'}; + $works &&= eval { require threads; 'threads'->import; 1 }; + + unless ($works) { + print "1..0 # Skip no working threads\n"; + exit 0; + } + + unless ( $ENV{AUTHOR_TESTING} ) { + print "1..0 # Skip many perls have broken threads. Enable with AUTHOR_TESTING.\n"; + exit 0; + } +} + +use threads; +use Test::More; + +subtest my_subtest => sub { + my $file = __FILE__; + $file =~ s/\.t$/.load/; + do $file || die $@; +}; + +done_testing; -- 1.9.1 ```
p5pRT commented 10 years ago

From @jkeenan

On Fri Oct 31 16​:02​:12 2014\, exodist7@​gmail.com wrote​:

Here we go.

Thanks. Applied to blead in commit 67727e37871164396acc46065fd87150d44c44f9

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

p5pRT commented 10 years ago

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

p5pRT commented 10 years ago

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