summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xPorting/Maintainers.pl2
-rw-r--r--cpan/Test-Simple/Changes16
-rw-r--r--cpan/Test-Simple/lib/Test/Builder.pm16
-rw-r--r--cpan/Test-Simple/lib/Test/Builder/Module.pm2
-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.pm9
-rw-r--r--cpan/Test-Simple/lib/Test/Simple.pm2
-rw-r--r--cpan/Test-Simple/t/fail-like.t9
-rw-r--r--cpan/Test-Simple/t/is_deeply_fail.t11
-rw-r--r--cpan/Test-Simple/t/subtest/plan.t2
-rw-r--r--cpan/Test-Simple/t/utf8.t14
12 files changed, 60 insertions, 27 deletions
diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl
index 5788ea7d7f..db880e48d4 100755
--- a/Porting/Maintainers.pl
+++ b/Porting/Maintainers.pl
@@ -1345,7 +1345,7 @@ use File::Glob qw(:case);
'Test::Simple' =>
{
'MAINTAINER' => 'mschwern',
- 'DISTRIBUTION' => 'MSCHWERN/Test-Simple-0.96.tar.gz',
+ 'DISTRIBUTION' => 'MSCHWERN/Test-Simple-0.97_01.tar.gz',
'FILES' => q[cpan/Test-Simple],
'EXCLUDED' => [
qw{.perlcriticrc
diff --git a/cpan/Test-Simple/Changes b/cpan/Test-Simple/Changes
index e7d6c6ea4b..72fb566252 100644
--- a/cpan/Test-Simple/Changes
+++ b/cpan/Test-Simple/Changes
@@ -1,3 +1,19 @@
+0.97_01 Fri Aug 27 22:50:30 PDT 2010
+ Test Fixes
+ * Adapted the tests for the new Perl 5.14 regex stringification.
+ (Karl Williamson) [github 44]
+
+ Doc Fixes
+ * Document how to test "use Foo ()". (Todd Rinaldo) [github 41]
+
+ Feature Changes
+ * subtest() no longer has a prototype. It was just getting in the way.
+ [rt.cpan.org 54239]
+ * The filehandles used by default will now inherit any filehandle
+ disciplines from STDOUT and STDERR IF AND ONLY IF they were applied
+ before Test::Builder is loaded. More later. [rt.cpan.org 46542]
+
+
0.96 Tue Aug 10 21:13:04 PDT 2010
Bug Fixes
* You can call done_testing() again after reset() [googlecode 59]
diff --git a/cpan/Test-Simple/lib/Test/Builder.pm b/cpan/Test-Simple/lib/Test/Builder.pm
index 52b32a1d9b..937c45dc19 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.96';
+our $VERSION = '0.97_01';
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
BEGIN {
@@ -1880,8 +1880,8 @@ sub _open_testhandles {
open( $Testout, ">&STDOUT" ) or die "Can't dup STDOUT: $!";
open( $Testerr, ">&STDERR" ) or die "Can't dup STDERR: $!";
- # $self->_copy_io_layers( \*STDOUT, $Testout );
- # $self->_copy_io_layers( \*STDERR, $Testerr );
+ $self->_copy_io_layers( \*STDOUT, $Testout );
+ $self->_copy_io_layers( \*STDERR, $Testerr );
$self->{Opened_Testhandles} = 1;
@@ -1896,13 +1896,21 @@ sub _copy_io_layers {
require PerlIO;
my @src_layers = PerlIO::get_layers($src);
- binmode $dst, join " ", map ":$_", @src_layers if @src_layers;
+ _apply_layers($dst, @src_layers) if @src_layers;
}
);
return;
}
+sub _apply_layers {
+ my ($fh, @layers) = @_;
+ my %seen;
+ my @unique = grep { $_ ne 'unix' and !$seen{$_}++ } @layers;
+ binmode($fh, join(":", "", "raw", @unique));
+}
+
+
=item reset_outputs
$tb->reset_outputs;
diff --git a/cpan/Test-Simple/lib/Test/Builder/Module.pm b/cpan/Test-Simple/lib/Test/Builder/Module.pm
index 800c058e0d..c78265a856 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.96';
+our $VERSION = '0.97_01';
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
diff --git a/cpan/Test-Simple/lib/Test/Builder/Tester.pm b/cpan/Test-Simple/lib/Test/Builder/Tester.pm
index 52a18b8a7f..a2c1fc56c3 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.20";
+our $VERSION = "1.21_01";
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 f006343c17..cae0cc245f 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.20";
+our $VERSION = "1.21_01";
require Test::Builder::Tester;
diff --git a/cpan/Test-Simple/lib/Test/More.pm b/cpan/Test-Simple/lib/Test/More.pm
index b0df2f8559..fd2754e8a6 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.96';
+our $VERSION = '0.97_01';
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
use Test::Builder::Module;
@@ -735,7 +735,7 @@ subtests are equivalent:
=cut
-sub subtest($&) {
+sub subtest {
my ($name, $subtests) = @_;
my $tb = Test::More->builder;
@@ -819,6 +819,11 @@ because the notion of "compile-time" is relative. Instead, you want:
BEGIN { use_ok('Some::Module') }
BEGIN { ...some code that depends on the use... }
+If you want the equivalent of C<use Foo ()>, use a module but not
+import anything, use C<require_ok>.
+
+ BEGIN { require_ok "Foo" }
+
=cut
diff --git a/cpan/Test-Simple/lib/Test/Simple.pm b/cpan/Test-Simple/lib/Test/Simple.pm
index 5a4911f8fa..d9e2a4740f 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.96';
+our $VERSION = '0.97_01';
$VERSION = eval $VERSION; ## no critic (BuiltinFunctions::ProhibitStringyEval)
use Test::Builder::Module;
diff --git a/cpan/Test-Simple/t/fail-like.t b/cpan/Test-Simple/t/fail-like.t
index 0ea5fab3da..0383094913 100644
--- a/cpan/Test-Simple/t/fail-like.t
+++ b/cpan/Test-Simple/t/fail-like.t
@@ -44,25 +44,28 @@ Test::More->import(tests => 1);
not ok 1 - is foo like that
OUT
+ # Accept both old and new-style stringification
+ my $modifiers = (qr/foobar/ =~ /\Q(?^/) ? '\\^' : '-xism';
+
my $err_re = <<ERR;
# Failed test 'is foo like that'
# at .* line 1\.
# 'foo'
-# doesn't match '\\(\\?-xism:that\\)'
+# doesn't match '\\(\\?$modifiers:that\\)'
ERR
$TB->like($err->read, qr/^$err_re$/, 'failing errors');
}
{
- # line 59
+ # line 62
like("foo", "not a regex");
$TB->is_eq($out->read, <<OUT);
not ok 2
OUT
$TB->is_eq($err->read, <<OUT);
-# Failed test at $0 line 59.
+# Failed test at $0 line 62.
# 'not a regex' doesn't look much like a regex to me.
OUT
diff --git a/cpan/Test-Simple/t/is_deeply_fail.t b/cpan/Test-Simple/t/is_deeply_fail.t
index c9276bddb8..508edd79fa 100644
--- a/cpan/Test-Simple/t/is_deeply_fail.t
+++ b/cpan/Test-Simple/t/is_deeply_fail.t
@@ -373,15 +373,18 @@ ERR
# rt.cpan.org 53469
{
-#line 377
+
+ # Accept both old and new-style stringification
+ my $modifiers = (qr/foobar/ =~ /\Q(?^/) ? '^' : '-xism';
+#line 380
ok !is_deeply( qr/a/, qr/b/, "different regexes" );
is( $out, "not ok 29 - different regexes\n" );
is( $err, <<ERR, ' right diagnostic' );
# Failed test 'different regexes'
-# at $0 line 377.
+# at $0 line 380.
# Structures begin differing at:
-# \$got = (?-xism:a)
-# \$expected = (?-xism:b)
+# \$got = (?$modifiers:a)
+# \$expected = (?$modifiers:b)
ERR
}
diff --git a/cpan/Test-Simple/t/subtest/plan.t b/cpan/Test-Simple/t/subtest/plan.t
index 98018b9616..7e944ab283 100644
--- a/cpan/Test-Simple/t/subtest/plan.t
+++ b/cpan/Test-Simple/t/subtest/plan.t
@@ -22,7 +22,7 @@ $ENV{HARNESS_ACTIVE} = 0;
{
ok defined &subtest, 'subtest() should be exported to our namespace';
- is prototype('subtest'), '$&', '... with the appropriate prototype';
+ is prototype('subtest'), undef, '... has no prototype';
subtest 'subtest with plan', sub {
plan tests => 2;
diff --git a/cpan/Test-Simple/t/utf8.t b/cpan/Test-Simple/t/utf8.t
index c7e93c3ac2..f68b2a7680 100644
--- a/cpan/Test-Simple/t/utf8.t
+++ b/cpan/Test-Simple/t/utf8.t
@@ -10,15 +10,14 @@ BEGIN {
use strict;
use warnings;
-use Test::More skip_all => 'Not yet implemented';
-
my $have_perlio;
BEGIN {
# All together so Test::More sees the open discipline
$have_perlio = eval q[
- use PerlIO;
- use open ':std', ':locale';
- use Test::More;
+ require PerlIO;
+ binmode *STDOUT, ":encoding(utf8)";
+ binmode *STDERR, ":encoding(utf8)";
+ require Test::More;
1;
];
}
@@ -53,10 +52,9 @@ SKIP: {
}
}
-SKIP: {
- skip( "Can't test in general because their locale is unknown", 2 )
- unless $ENV{AUTHOR_TESTING};
+# Test utf8 is ok.
+{
my $uni = "\x{11e}";
my @warnings;