From: Rafael Garcia-Suarez Date: Tue, 25 Sep 2007 12:20:25 +0000 (+0000) Subject: Upgrade to Test::Simple 0.72 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4d84587446ede57955bcf063281333bc358c9c57;p=p5sagit%2Fp5-mst-13.2.git Upgrade to Test::Simple 0.72 p4raw-id: //depot/perl@31966 --- diff --git a/MANIFEST b/MANIFEST index 3a15d83..ac26700 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2621,7 +2621,6 @@ 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 test 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 be50cad..b4e6371 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.71'; +$VERSION = '0.72'; $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 0bfa4ab..a7d56dd 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.71'; +$VERSION = '0.72'; use strict; diff --git a/lib/Test/Builder/Tester.pm b/lib/Test/Builder/Tester.pm index db008ff..598eb19 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.08"; +$VERSION = "1.09"; use Test::Builder; use Symbol; diff --git a/lib/Test/More.pm b/lib/Test/More.pm index 9ed402e..a7bd13a 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.71'; +$VERSION = '0.72'; $VERSION = eval $VERSION; # make the alpha version come out as a number use Test::Builder::Module; @@ -659,37 +659,32 @@ sub use_ok ($;@) { my($pack,$filename,$line) = caller; - # Work around a glitch in $@ and eval - my $eval_error; - { - local($@,$!,$SIG{__DIE__}); # isolate eval + 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( !$eval_error, "use $module;" ); + my $ok = $tb->ok( !$@, "use $module;" ); unless( $ok ) { - chomp $eval_error; + chomp $@; $@ =~ s{^BEGIN failed--compilation aborted at .*$} {BEGIN failed--compilation aborted at $filename line $line.}m; $tb->diag(<ok() - Add test name to diagnostic output - Add diag() to details(). Add at_end() callback? diff --git a/lib/Test/Simple/t/BEGIN_use_ok.t b/lib/Test/Simple/t/BEGIN_use_ok.t deleted file mode 100644 index 26caaa1..0000000 --- a/lib/Test/Simple/t/BEGIN_use_ok.t +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/perl -w - -# [rt.cpan.org 28345] -# -# A use_ok() inside a BEGIN block lacking a plan would be silently ignored. - -BEGIN { - if( $ENV{PERL_CORE} ) { - chdir 't'; - @INC = ('../lib', 'lib'); - } - else { - unshift @INC, 't/lib'; - } -} - -use Test::More; - -my $result; -BEGIN { - eval { - use_ok("Wibble"); - }; - $result = $@; -} - -plan tests => 1; -like $result, '/^You tried to run a test without a plan/'; diff --git a/lib/Test/Simple/t/is_deeply_with_threads.t b/lib/Test/Simple/t/is_deeply_with_threads.t index 4cc5426..a9e2e5a 100644 --- a/lib/Test/Simple/t/is_deeply_with_threads.t +++ b/lib/Test/Simple/t/is_deeply_with_threads.t @@ -36,7 +36,7 @@ sub do_one_thread { 'hello', 's', 'thisisalongname', '1', '2', '3', 'abc', 'xyz', '1234567890', 'm', 'n', 'p' ); my @list2 = @list; - print "# kid $kid before eq_set\n"; + print "# kid $kid before is_deeply\n"; for my $j (1..100) { is_deeply(\@list, \@list2);