diff options
Diffstat (limited to 'gnu/usr.bin/perl/cpan/Test-Simple')
12 files changed, 30 insertions, 28 deletions
diff --git a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Builder.pm b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Builder.pm index b61bd5024da..1a49b7a8e7c 100644 --- a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Builder.pm +++ b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Builder.pm @@ -4,7 +4,7 @@ use 5.006; use strict; use warnings; -our $VERSION = '1.302162'; +our $VERSION = '1.302175'; BEGIN { if( $] < 5.008 ) { @@ -63,7 +63,8 @@ sub _add_ts_hooks { $todo = ${"$cpkg\::TODO"} if $cpkg; $todo = ${"$epkg\::TODO"} if $epkg && !$todo; - return $e unless defined $todo; + return $e unless defined($todo); + return $e unless length($todo); # Turn a diag into a todo diag return Test::Builder::TodoDiag->new(%$e) if ref($e) eq 'Test2::Event::Diag'; @@ -390,7 +391,7 @@ sub name { sub reset { ## no critic (Subroutines::ProhibitBuiltinHomonyms) my ($self, %params) = @_; - Test2::API::test2_set_is_end(0); + Test2::API::test2_unset_is_end(); # We leave this a global because it has to be localized and localizing # hash keys is just asking for pain. Also, it was documented. @@ -695,7 +696,7 @@ sub _ok_debug { my $self = shift; my ($trace, $orig_name) = @_; - my $is_todo = defined($self->todo); + my $is_todo = $self->in_todo; my $msg = $is_todo ? "Failed (TODO)" : "Failed"; diff --git a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Builder/Module.pm b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Builder/Module.pm index 1ca914dee65..6e550eb6f7f 100644 --- a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Builder/Module.pm +++ b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Builder/Module.pm @@ -7,7 +7,7 @@ use Test::Builder; require Exporter; our @ISA = qw(Exporter); -our $VERSION = '1.302162'; +our $VERSION = '1.302175'; =head1 NAME @@ -172,4 +172,11 @@ sub builder { return Test::Builder->new; } +=head1 SEE ALSO + +L<< Test2::Manual::Tooling::TestBuilder >> describes the improved +options for writing testing modules provided by L<< Test2 >>. + +=cut + 1; diff --git a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Builder/Tester.pm b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Builder/Tester.pm index 469336d8755..da98e3d9a07 100644 --- a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Builder/Tester.pm +++ b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Builder/Tester.pm @@ -1,7 +1,7 @@ package Test::Builder::Tester; use strict; -our $VERSION = '1.302162'; +our $VERSION = '1.302175'; use Test::Builder; use Symbol; diff --git a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm index 0bf39c60d71..116e6057d85 100644 --- a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm +++ b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm @@ -1,7 +1,7 @@ package Test::Builder::Tester::Color; use strict; -our $VERSION = '1.302162'; +our $VERSION = '1.302175'; require Test::Builder::Tester; diff --git a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/More.pm b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/More.pm index 473c86eba63..b2f82286b44 100644 --- a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/More.pm +++ b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/More.pm @@ -17,7 +17,7 @@ sub _carp { return warn @_, " at $file line $line\n"; } -our $VERSION = '1.302162'; +our $VERSION = '1.302175'; use Test::Builder::Module; our @ISA = qw(Test::Builder::Module); @@ -1402,7 +1402,7 @@ You then know the thing you had todo is done and can remove the TODO flag. The nice part about todo tests, as opposed to simply commenting out a -block of tests, is it's like having a programmatic todo list. You know +block of tests, is that it is like having a programmatic todo list. You know how much work is left to be done, you're aware of what bugs there are, and you'll know immediately when they're fixed. @@ -1848,7 +1848,7 @@ might get a "Wide character in print" warning. Using C<< binmode STDOUT, ":utf8" >> will not fix it. L<Test::Builder> (which powers Test::More) duplicates STDOUT and STDERR. So any changes to them, -including changing their output disciplines, will not be seem by +including changing their output disciplines, will not be seen by Test::More. One work around is to apply encodings to STDOUT and STDERR as early diff --git a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Simple.pm b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Simple.pm index 9218173bc50..6ff8183b804 100644 --- a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Simple.pm +++ b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Simple.pm @@ -4,7 +4,7 @@ use 5.006; use strict; -our $VERSION = '1.302162'; +our $VERSION = '1.302175'; use Test::Builder::Module; our @ISA = qw(Test::Builder::Module); diff --git a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Tester.pm b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Tester.pm index 19cbf665712..1cc7bd179e7 100644 --- a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Tester.pm +++ b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Tester.pm @@ -18,7 +18,7 @@ require Exporter; use vars qw( @ISA @EXPORT ); -our $VERSION = '1.302162'; +our $VERSION = '1.302175'; @EXPORT = qw( run_tests check_tests check_test cmp_results show_space ); @ISA = qw( Exporter ); @@ -393,7 +393,7 @@ The easiest way to test is to do something like } ); -this will execute the is_mystyle_eq test, capturing it's results and +this will execute the is_mystyle_eq test, capturing its results and checking that they are what was expected. You may need to examine the test results in a more flexible way, for diff --git a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Tester/Capture.pm b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Tester/Capture.pm index e28dbf83432..c5c454215f5 100644 --- a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Tester/Capture.pm +++ b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Tester/Capture.pm @@ -2,7 +2,7 @@ use strict; package Test::Tester::Capture; -our $VERSION = '1.302162'; +our $VERSION = '1.302175'; use Test::Builder; @@ -13,14 +13,8 @@ use vars qw( @ISA ); # Make Test::Tester::Capture thread-safe for ithreads. BEGIN { use Config; - if( $] >= 5.008 && $Config{useithreads} ) { - require threads::shared; - threads::shared->import; - } - else { - *share = sub { 0 }; - *lock = sub { 0 }; - } + *share = sub { 0 }; + *lock = sub { 0 }; } my $Curr_Test = 0; share($Curr_Test); @@ -30,7 +24,7 @@ my $Prem_Diag = {diag => ""}; share($Curr_Test); sub new { # Test::Tester::Capgture::new used to just return __PACKAGE__ - # because Test::Builder::new enforced it's singleton nature by + # because Test::Builder::new enforced its singleton nature by # return __PACKAGE__. That has since changed, Test::Builder::new now # returns a blessed has and around version 0.78, Test::Builder::todo # started wanting to modify $self. To cope with this, we now return @@ -229,7 +223,7 @@ Test::Tester::Capture - Help testing test modules built with Test::Builder =head1 DESCRIPTION This is a subclass of Test::Builder that overrides many of the methods so -that they don't output anything. It also keeps track of it's own set of test +that they don't output anything. It also keeps track of its own set of test results so that you can use Test::Builder based modules to perform tests on other Test::Builder based modules. diff --git a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Tester/CaptureRunner.pm b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Tester/CaptureRunner.pm index 7cf3c0f0b52..a86ef0616c8 100644 --- a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Tester/CaptureRunner.pm +++ b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Tester/CaptureRunner.pm @@ -3,7 +3,7 @@ use strict; package Test::Tester::CaptureRunner; -our $VERSION = '1.302162'; +our $VERSION = '1.302175'; use Test::Tester::Capture; diff --git a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Tester/Delegate.pm b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Tester/Delegate.pm index ebfd4e21681..2036f2ebc28 100644 --- a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Tester/Delegate.pm +++ b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/Tester/Delegate.pm @@ -3,7 +3,7 @@ use warnings; package Test::Tester::Delegate; -our $VERSION = '1.302162'; +our $VERSION = '1.302175'; use Scalar::Util(); diff --git a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/use/ok.pm b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/use/ok.pm index a81bbfb64a3..4113ef59c86 100644 --- a/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/use/ok.pm +++ b/gnu/usr.bin/perl/cpan/Test-Simple/lib/Test/use/ok.pm @@ -1,7 +1,7 @@ package Test::use::ok; use 5.005; -our $VERSION = '1.302162'; +our $VERSION = '1.302175'; __END__ diff --git a/gnu/usr.bin/perl/cpan/Test-Simple/lib/ok.pm b/gnu/usr.bin/perl/cpan/Test-Simple/lib/ok.pm index 66dcad8635f..f3b394d9f69 100644 --- a/gnu/usr.bin/perl/cpan/Test-Simple/lib/ok.pm +++ b/gnu/usr.bin/perl/cpan/Test-Simple/lib/ok.pm @@ -1,5 +1,5 @@ package ok; -our $VERSION = '1.302162'; +our $VERSION = '1.302175'; use strict; use Test::More (); |