diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-09-25 12:20:25 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-09-25 12:20:25 +0000 |
commit | 4d84587446ede57955bcf063281333bc358c9c57 (patch) | |
tree | 005b321f3b6049cf29f4119d3bf17b6633f55414 /lib/Test | |
parent | 087b5369f6d9d58850930f241538fb771b1fb1ec (diff) | |
download | perl-4d84587446ede57955bcf063281333bc358c9c57.tar.gz |
Upgrade to Test::Simple 0.72
p4raw-id: //depot/perl@31966
Diffstat (limited to 'lib/Test')
-rw-r--r-- | lib/Test/Builder.pm | 2 | ||||
-rw-r--r-- | lib/Test/Builder/Module.pm | 2 | ||||
-rw-r--r-- | lib/Test/Builder/Tester.pm | 2 | ||||
-rw-r--r-- | lib/Test/More.pm | 29 | ||||
-rw-r--r-- | lib/Test/Simple.pm | 2 | ||||
-rw-r--r-- | lib/Test/Simple/Changes | 28 | ||||
-rw-r--r-- | lib/Test/Simple/TODO | 2 | ||||
-rw-r--r-- | lib/Test/Simple/t/BEGIN_use_ok.t | 28 | ||||
-rw-r--r-- | lib/Test/Simple/t/is_deeply_with_threads.t | 2 |
9 files changed, 45 insertions, 52 deletions
diff --git a/lib/Test/Builder.pm b/lib/Test/Builder.pm index be50cadacb..b4e63714fa 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 0bfa4abe81..a7d56dd0fd 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 db008ff631..598eb19e69 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 9ed402e4a7..a7bd13a144 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 <<USE; + 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 <<USE; package $pack; use $module $imports[0]; USE - } - else { - eval <<USE; + } + else { + eval <<USE; package $pack; use $module \@imports; USE - } - $eval_error = $@; } - my $ok = $tb->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(<<DIAGNOSTIC); Tried to use '$module'. - Error: $eval_error + Error: $@ DIAGNOSTIC } diff --git a/lib/Test/Simple.pm b/lib/Test/Simple.pm index 52ce38ebb5..34fba63fed 100644 --- a/lib/Test/Simple.pm +++ b/lib/Test/Simple.pm @@ -4,7 +4,7 @@ use 5.004; use strict 'vars'; use vars qw($VERSION @ISA @EXPORT); -$VERSION = '0.71'; +$VERSION = '0.72'; $VERSION = eval $VERSION; # make the alpha version come out as a number use Test::Builder::Module; diff --git a/lib/Test/Simple/Changes b/lib/Test/Simple/Changes index f759c94652..17adc3fc1a 100644 --- a/lib/Test/Simple/Changes +++ b/lib/Test/Simple/Changes @@ -1,3 +1,31 @@ +0.72 Wed Sep 19 20:08:07 PDT 2007 + Bug unfixes + * The BEGIN { use_ok } fix for [rt.cpan.org 28345] revealed a small pile of + mistakes in CPAN module test suites. Rolling the fix back to give the authors + a bit of time to fix their tests. + +0.71 Thu Sep 13 20:42:36 PDT 2007 + Bug fixes + - Fixed a problem with BEGIN { use_ok } silently failing when there's no + plan set. [rt.cpan.org 28345] Thanks Adriano Ferreira and Yitzchak. + - Fixed an obscure problem with is_deeply() and overloading == + [rt.cpan.org 20768]. Thanks Sisyphus. + + Test fixes + - Removed dependency on Text::Soundex [rt.cpan.org 25022] + - Fixed a 5.5.x failure in fail-more.t + * Got rid of the annoying sort_bug.t test that revealed problems with some + threaded perls. It was testing the deprecated eq_* functions and not worth the + bother. Now it tests is_deeply(). [rt.cpan.org 17791] + + Doc fixes + - Minor POD mistake in Test::Builder [rt.cpan.org 28869] + * Test::FAQ has been updated with some more answers. + + Install fixes + - Fixed the "LICENSE is not a known MakeMaker parameter name" warning + on older MakeMakers for real this time. + 0.70 Thu Mar 15 15:53:05 PDT 2007 Bug Fixes * The change to is_fh() in 0.68 broke the case where a reference to diff --git a/lib/Test/Simple/TODO b/lib/Test/Simple/TODO index 6bf1286279..c596e90876 100644 --- a/lib/Test/Simple/TODO +++ b/lib/Test/Simple/TODO @@ -9,8 +9,6 @@ a few more I haven't put in RT yet. Document that everything goes through Test::Builder->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 26caaa127e..0000000000 --- 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 4cc54263e3..a9e2e5aae0 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); |