From: Steve Peters Date: Wed, 19 Dec 2007 14:30:46 +0000 (+0000) Subject: Update to Test-Simple-0.74 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=00881caab98587f268f6d3592d046699b75f69c4;p=p5sagit%2Fp5-mst-13.2.git Update to Test-Simple-0.74 p4raw-id: //depot/perl@32650 --- diff --git a/MANIFEST b/MANIFEST index cb0cdda..3ac0a6c 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2630,6 +2630,7 @@ lib/Test/Simple/README Test::Simple README lib/Test/Simple/t/00test_harness_check.t Test::Simple test lib/Test/Simple/t/bad_plan.t Test::Builder plan() test lib/Test/Simple/t/bail_out.t Test::Builder BAIL_OUT test +lib/Test/Simple/t/BEGIN_use_ok.t Test::More use_ok() testing lib/Test/Simple/t/buffer.t Test::Builder buffering test lib/Test/Simple/t/Builder.t Test::Builder tests lib/Test/Simple/t/carp.t Test::Builder test diff --git a/lib/Test/Builder.pm b/lib/Test/Builder.pm index b4e6371..8aaa28e 100644 --- a/lib/Test/Builder.pm +++ b/lib/Test/Builder.pm @@ -8,7 +8,7 @@ $^C ||= 0; use strict; use vars qw($VERSION); -$VERSION = '0.72'; +$VERSION = '0.74'; $VERSION = eval $VERSION; # make the alpha version come out as a number # Make Test::Builder thread-safe for ithreads. diff --git a/lib/Test/Builder/Module.pm b/lib/Test/Builder/Module.pm index a7d56dd..7fa0a5c 100644 --- a/lib/Test/Builder/Module.pm +++ b/lib/Test/Builder/Module.pm @@ -5,7 +5,7 @@ use Test::Builder; require Exporter; @ISA = qw(Exporter); -$VERSION = '0.72'; +$VERSION = '0.74'; use strict; diff --git a/lib/Test/Builder/Tester.pm b/lib/Test/Builder/Tester.pm index 598eb19..487b16d 100644 --- a/lib/Test/Builder/Tester.pm +++ b/lib/Test/Builder/Tester.pm @@ -2,7 +2,7 @@ package Test::Builder::Tester; use strict; use vars qw(@EXPORT $VERSION @ISA); -$VERSION = "1.09"; +$VERSION = "1.11"; use Test::Builder; use Symbol; diff --git a/lib/Test/More.pm b/lib/Test/More.pm index a7bd13a..abdd55e 100644 --- a/lib/Test/More.pm +++ b/lib/Test/More.pm @@ -16,7 +16,7 @@ sub _carp { use vars qw($VERSION @ISA @EXPORT %EXPORT_TAGS $TODO); -$VERSION = '0.72'; +$VERSION = '0.74'; $VERSION = eval $VERSION; # make the alpha version come out as a number use Test::Builder::Module; @@ -659,32 +659,37 @@ sub use_ok ($;@) { my($pack,$filename,$line) = caller; - local($@,$!,$SIG{__DIE__}); # isolate eval + # Work around a glitch in $@ and eval + my $eval_error; + { + local($@,$!,$SIG{__DIE__}); # isolate eval - if( @imports == 1 and $imports[0] =~ /^\d+(?:\.\d+)?$/ ) { - # probably a version check. Perl needs to see the bare number - # for it to work with non-Exporter based modules. - eval <ok( !$@, "use $module;" ); + my $ok = $tb->ok( !$eval_error, "use $module;" ); unless( $ok ) { - chomp $@; + chomp $eval_error; $@ =~ s{^BEGIN failed--compilation aborted at .*$} {BEGIN failed--compilation aborted at $filename line $line.}m; $tb->diag(< 1; +like $result, '/^You tried to run a test without a plan/';