summaryrefslogtreecommitdiff
path: root/cpan/Test-Simple/lib/Test
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2011-02-23 10:20:34 +0000
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2011-02-23 10:22:05 +0000
commitc8c139910f0949c2e0a1fa2819c15d4c834fa5cd (patch)
treea98401a451f58c81e0f86d302edf11e32ac9f1a1 /cpan/Test-Simple/lib/Test
parentc859a0d911155a35c737eed4bca3455a8f5e4421 (diff)
downloadperl-c8c139910f0949c2e0a1fa2819c15d4c834fa5cd.tar.gz
Update Test-Simple to CPAN version 0.98
[DELTA] 0.98 Wed, 23 Feb 2011 14:38:02 +1100 Bug Fixes * subtest() should not fail if $? is non-zero. (Aaron Crane) Docs * The behavior of is() and undef has been documented. (Pedro Melo)
Diffstat (limited to 'cpan/Test-Simple/lib/Test')
-rw-r--r--cpan/Test-Simple/lib/Test/Builder.pm8
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/Module.pm4
-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/More.pm7
-rw-r--r--cpan/Test-Simple/lib/Test/Simple.pm2
6 files changed, 18 insertions, 7 deletions
diff --git a/cpan/Test-Simple/lib/Test/Builder.pm b/cpan/Test-Simple/lib/Test/Builder.pm
index 937c45dc19..cb4335f5ce 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 = '0.97_01';
+our $VERSION = '0.98';
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
BEGIN {
@@ -312,6 +312,8 @@ sub finalize {
if( $self->{Child_Name} ) {
$self->croak("Can't call finalize() with child ($self->{Child_Name}) active");
}
+
+ local $? = 0; # don't fail if $subtests happened to set $? nonzero
$self->_ending;
# XXX This will only be necessary for TAP envelopes (we think)
@@ -923,6 +925,8 @@ sub _is_dualvar {
Like Test::More's C<is()>. Checks if C<$got eq $expected>. This is the
string version.
+C<undef> only ever matches another C<undef>.
+
=item B<is_num>
$Test->is_num($got, $expected, $name);
@@ -930,6 +934,8 @@ string version.
Like Test::More's C<is()>. Checks if C<$got == $expected>. This is the
numeric version.
+C<undef> only ever matches another C<undef>.
+
=cut
sub is_eq {
diff --git a/cpan/Test-Simple/lib/Test/Builder/Module.pm b/cpan/Test-Simple/lib/Test/Builder/Module.pm
index c78265a856..12a1e61bc2 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 = '0.97_01';
+our $VERSION = '0.98';
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
@@ -58,7 +58,7 @@ the plan independent of Test::More.
All arguments passed to import() are passed onto
C<< Your::Module->builder->plan() >> with the exception of
-C<import =>[qw(things to import)]>.
+C<< import =>[qw(things to import)] >>.
use Your::Module import => [qw(this that)], tests => 23;
diff --git a/cpan/Test-Simple/lib/Test/Builder/Tester.pm b/cpan/Test-Simple/lib/Test/Builder/Tester.pm
index a2c1fc56c3..793139f795 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.21_01";
+our $VERSION = "1.22";
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 cae0cc245f..9fb6cf15a8 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.21_01";
+our $VERSION = "1.22";
require Test::Builder::Tester;
diff --git a/cpan/Test-Simple/lib/Test/More.pm b/cpan/Test-Simple/lib/Test/More.pm
index fd2754e8a6..c1f5bf1d15 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 = '0.97_01';
+our $VERSION = '0.98';
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
use Test::Builder::Module;
@@ -317,6 +317,11 @@ are similar to these:
ok( ultimate_answer() eq 42, "Meaning of Life" );
ok( $foo ne '', "Got some foo" );
+C<undef> will only ever match C<undef>. So you can test a value
+agains C<undef> like this:
+
+ is($not_defined, undef, "undefined as expected");
+
(Mnemonic: "This is that." "This isn't that.")
So why use these? They produce better diagnostics on failure. ok()
diff --git a/cpan/Test-Simple/lib/Test/Simple.pm b/cpan/Test-Simple/lib/Test/Simple.pm
index d9e2a4740f..1a85d36e3e 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 = '0.97_01';
+our $VERSION = '0.98';
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
use Test::Builder::Module;