Change 34761 by [EMAIL PROTECTED] on 2008/11/07 10:32:32

        Upgrade to Test-Simple-0.85_01, keeping local changes 34491 and 34545

Affected files ...

... //depot/perl/MANIFEST#1744 edit
... //depot/perl/lib/Test/Builder.pm#36 edit
... //depot/perl/lib/Test/Builder/Module.pm#16 edit
... //depot/perl/lib/Test/Builder/Tester.pm#15 edit
... //depot/perl/lib/Test/More.pm#42 edit
... //depot/perl/lib/Test/Simple.pm#36 edit
... //depot/perl/lib/Test/Simple/Changes#28 edit
... //depot/perl/lib/Test/Simple/t/Builder/try.t#2 edit
... //depot/perl/lib/Test/Simple/t/c_flag.t#1 add
... //depot/perl/lib/Test/Simple/t/cmp_ok.t#3 edit
... //depot/perl/lib/Test/Simple/t/diag.t#8 edit
... //depot/perl/lib/Test/Simple/t/fail-more.t#18 edit
... //depot/perl/lib/Test/Simple/t/is_deeply_dne_bug.t#3 edit
... //depot/perl/lib/Test/Simple/t/is_deeply_fail.t#7 edit
... //depot/perl/lib/Test/Simple/t/no_plan.t#10 edit
... //depot/perl/lib/Test/Simple/t/overload.t#6 edit
... //depot/perl/lib/Test/Simple/t/overload_threads.t#3 edit
... //depot/perl/lib/Test/Simple/t/undef.t#8 edit

Differences ...

==== //depot/perl/MANIFEST#1744 (text) ====
Index: perl/MANIFEST
--- perl/MANIFEST#1743~34758~   2008-11-07 00:47:26.000000000 -0800
+++ perl/MANIFEST       2008-11-07 02:32:32.000000000 -0800
@@ -2883,6 +2883,7 @@
 lib/Test/Simple/t/Builder/output.t     Test::Builder tests
 lib/Test/Simple/t/Builder/reset.t      Test::Builder tests
 lib/Test/Simple/t/Builder/try.t                Test::Builder tests
+lib/Test/Simple/t/c_flag.t     Test::Simple test
 lib/Test/Simple/t/circular_data.t      Test::Simple test
 lib/Test/Simple/t/cmp_ok.t     Test::More test
 lib/Test/Simple/t/diag.t       Test::More diag() test

==== //depot/perl/lib/Test/Builder.pm#36 (text) ====
Index: perl/lib/Test/Builder.pm
--- perl/lib/Test/Builder.pm#35~34491~  2008-10-15 12:07:38.000000000 -0700
+++ perl/lib/Test/Builder.pm    2008-11-07 02:32:32.000000000 -0800
@@ -5,7 +5,7 @@
 use strict;
 use warnings;
 
-our $VERSION = '0.82_01';
+our $VERSION = '0.85_02';
 $VERSION = eval $VERSION;    ## no critic 
(BuiltinFunctions::ProhibitStringyEval)
 
 # Make Test::Builder thread-safe for ithreads.
@@ -457,7 +457,7 @@
     my $self = shift;
     my $type = shift;
 
-    $self->_try( sub { require overload } ) || return;
+    $self->_try(sub { require overload; }, die_on_fail => 1);
 
     foreach my $thing (@_) {
         if( $self->_is_object($$thing) ) {
@@ -500,6 +500,9 @@
 sub _is_dualvar {
     my( $self, $val ) = @_;
 
+    # Objects are not dualvars.
+    return 0 if ref $val;
+
     no warnings 'numeric';
     my $numval = $val + 0;
     return $numval != 0 and $numval ne $val ? 1 : 0;
@@ -698,34 +701,41 @@
 sub cmp_ok {
     my( $self, $got, $type, $expect, $name ) = @_;
 
-    # Treat overloaded objects as numbers if we're asked to do a
-    # numeric comparison.
-    my $unoverload
-      = $numeric_cmps{$type}
-      ? '_unoverload_num'
-      : '_unoverload_str';
-
-    $self->$unoverload( \$got, \$expect );
-
     my $test;
+    my $error;
     {
         ## no critic (BuiltinFunctions::ProhibitStringyEval)
 
         local( $@, $!, $SIG{__DIE__} );    # isolate eval
 
-        my $code = $self->_caller_context;
-
-        # Yes, it has to look like this or 5.4.5 won't see the #line
-        # directive.
-        # Don't ask me, man, I just work here.
-        $test = eval "
-$code" . "\$got $type \$expect;";
+        my($pack, $file, $line) = $self->caller();
 
+        $test = eval qq[
+#line 1 "cmp_ok [from $file line $line]"
+\$got $type \$expect;
+];
+        $error = $@;
     }
     local $Level = $Level + 1;
     my $ok = $self->ok( $test, $name );
 
+    # Treat overloaded objects as numbers if we're asked to do a
+    # numeric comparison.
+    my $unoverload
+      = $numeric_cmps{$type}
+      ? '_unoverload_num'
+      : '_unoverload_str';
+
+    $self->diag(<<"END") if $error;
+An error occurred while using $type:
+------------------------------------
+$error
+------------------------------------
+END
+
     unless($ok) {
+        $self->$unoverload( \$got, \$expect );
+
         if( $type =~ /^(eq|==)$/ ) {
             $self->_is_diag( $got, $type, $expect );
         }
@@ -1032,14 +1042,21 @@
 =cut
 
 sub _try {
-    my( $self, $code ) = @_;
+    my( $self, $code, %opts ) = @_;
 
-    local $!;               # eval can mess up $!
-    local $@;               # don't set $@ in the test
-    local $SIG{__DIE__};    # don't trip an outside DIE handler.
-    my $return = eval { $code->() };
+    my $error;
+    my $return;
+    {
+        local $!;               # eval can mess up $!
+        local $@;               # don't set $@ in the test
+        local $SIG{__DIE__};    # don't trip an outside DIE handler.
+        $return = eval { $code->() };
+        $error = $@;
+    }
+
+    die $error if $error and $opts{die_on_fail};
 
-    return wantarray ? ( $return, $@ ) : $return;
+    return wantarray ? ( $return, $error ) : $return;
 }
 
 =end private
@@ -1286,7 +1303,7 @@
     return map {
         ref $_
           ? do {
-            require Data::Dumper;
+            $self->_try(sub { require Data::Dumper }, die_on_fail => 1);
 
             my $dumper = Data::Dumper->new( [$_] );
             $dumper->Indent(1)->Terse(1);
@@ -1327,10 +1344,10 @@
 
     # Escape each line after the first with a # so we don't
     # confuse Test::Harness.
-    $msg =~ s/\n(.)/\n# $1/sg;
+    $msg =~ s{\n(?!\z)}{\n# }sg;
 
     # Stick a newline on the end if it needs it.
-    $msg .= "\n" unless $msg =~ /\n\Z/;
+    $msg .= "\n" unless $msg =~ /\n\z/;
 
     return print $fh $msg;
 }
@@ -1825,13 +1842,20 @@
 
 C<$height> will be added to the level().
 
+If caller() winds up off the top of the stack it report the highest context.
+
 =cut
 
 sub caller {    ## no critic (Subroutines::ProhibitBuiltinHomonyms)
     my( $self, $height ) = @_;
     $height ||= 0;
 
-    my @caller = CORE::caller( $self->level + $height + 1 );
+    my $level = $self->level + $height + 1;
+    my @caller;
+    do {
+        @caller = CORE::caller( $level );
+        $level--;
+    } until @caller;
     return wantarray ? @caller : $caller[0];
 }
 

==== //depot/perl/lib/Test/Builder/Module.pm#16 (text) ====
Index: perl/lib/Test/Builder/Module.pm
--- perl/lib/Test/Builder/Module.pm#15~34483~   2008-10-15 06:11:04.000000000 
-0700
+++ perl/lib/Test/Builder/Module.pm     2008-11-07 02:32:32.000000000 -0800
@@ -8,7 +8,7 @@
 require Exporter;
 our @ISA = qw(Exporter);
 
-our $VERSION = '0.82';
+our $VERSION = '0.85_01';
 
 # 5.004's Exporter doesn't have export_to_level.
 my $_export_to_level = sub {

==== //depot/perl/lib/Test/Builder/Tester.pm#15 (text) ====
Index: perl/lib/Test/Builder/Tester.pm
--- perl/lib/Test/Builder/Tester.pm#14~34483~   2008-10-15 06:11:04.000000000 
-0700
+++ perl/lib/Test/Builder/Tester.pm     2008-11-07 02:32:32.000000000 -0800
@@ -2,7 +2,7 @@
 # $Id: /mirror/googlecode/test-more-trunk/lib/Test/Builder/Tester.pm 67223 
2008-10-15T03:08:18.888155Z schwern  $
 
 use strict;
-our $VERSION = "1.15";
+our $VERSION = "1.17_01";
 
 use Test::Builder;
 use Symbol;

==== //depot/perl/lib/Test/More.pm#42 (text) ====
Index: perl/lib/Test/More.pm
--- perl/lib/Test/More.pm#41~34483~     2008-10-15 06:11:04.000000000 -0700
+++ perl/lib/Test/More.pm       2008-11-07 02:32:32.000000000 -0800
@@ -18,7 +18,7 @@
     return warn @_, " at $file line $line\n";
 }
 
-our $VERSION = '0.82';
+our $VERSION = '0.85_01';
 $VERSION = eval $VERSION;    ## no critic 
(BuiltinFunctions::ProhibitStringyEval)
 
 use Test::Builder::Module;

==== //depot/perl/lib/Test/Simple.pm#36 (text) ====
Index: perl/lib/Test/Simple.pm
--- perl/lib/Test/Simple.pm#35~34483~   2008-10-15 06:11:04.000000000 -0700
+++ perl/lib/Test/Simple.pm     2008-11-07 02:32:32.000000000 -0800
@@ -5,7 +5,7 @@
 
 use strict;
 
-our $VERSION = '0.82';
+our $VERSION = '0.85_01';
 $VERSION = eval $VERSION;    ## no critic 
(BuiltinFunctions::ProhibitStringyEval)
 
 use Test::Builder::Module;

==== //depot/perl/lib/Test/Simple/Changes#28 (text) ====
Index: perl/lib/Test/Simple/Changes
--- perl/lib/Test/Simple/Changes#27~34544~      2008-10-20 23:46:54.000000000 
-0700
+++ perl/lib/Test/Simple/Changes        2008-11-07 02:32:32.000000000 -0800
@@ -1,3 +1,25 @@
+0.85_01  Thu Oct 23 18:57:38 PDT 2008
+    New Features
+    * cmp_ok() now displays the error if the comparison throws one.
+      For example, broken overloaded objects.
+
+    Bug Fixes
+    * cmp_ok() no longer stringifies or numifies its arguments before 
comparing.
+      This makes cmp_ok() properly test overloaded ops.
+      [rt.cpan.org 24186] [code.google.com 16]
+    * diag() properly escapes blank lines.
+
+    Feature Changes
+    * cmp_ok() now reports warnings and errors as coming from inside cmp_ok,
+      as well as reporting the caller's file and line.  This let's the user
+      know where cmp_ok() was called from while reminding them that it is
+      being run in a different context.
+
+    Other
+    * Dependency on ExtUtils::MakeMaker 6.27 only on Windows otherwise the
+      nested tests won't run.
+
+
 0.84  Wed Oct 15 09:06:12 EDT 2008
     Other
     * 0.82 accidentally shipped with experimental Mouse dependency.

==== //depot/perl/lib/Test/Simple/t/Builder/try.t#2 (text) ====
Index: perl/lib/Test/Simple/t/Builder/try.t
--- perl/lib/Test/Simple/t/Builder/try.t#1~34483~       2008-10-15 
06:11:04.000000000 -0700
+++ perl/lib/Test/Simple/t/Builder/try.t        2008-11-07 02:32:32.000000000 
-0800
@@ -18,19 +18,26 @@
 require Test::Builder;
 my $tb = Test::Builder->new;
 
-local $SIG{__DIE__} = sub { fail("DIE handler called: @_") };
 
-# These should not change;
-local $@ = 42;
-local $! = 23;
-
-is $tb->_try(sub { 2 }), 2;
-is $tb->_try(sub { return '' }), '';
-
-is $tb->_try(sub { die; }), undef;
-
-is_deeply [$tb->_try(sub { die "Foo\n" }, undef)],
-          [undef, "Foo\n"];
-
-is $@, 42;
-cmp_ok $!, '==', 23;
+# Test that _try() has no effect on $@ and $! and is not effected by
+# __DIE__
+{
+    local $SIG{__DIE__} = sub { fail("DIE handler called: @_") };
+    local $@ = 42;
+    local $! = 23;
+
+    is $tb->_try(sub { 2 }), 2;
+    is $tb->_try(sub { return '' }), '';
+
+    is $tb->_try(sub { die; }), undef;
+
+    is_deeply [$tb->_try(sub { die "Foo\n" })], [undef, "Foo\n"];
+
+    is $@, 42;
+    cmp_ok $!, '==', 23;
+}
+
+ok !eval {
+    $tb->_try(sub { die "Died\n" }, die_on_fail => 1);
+};
+is $@, "Died\n";

==== //depot/perl/lib/Test/Simple/t/c_flag.t#1 (text) ====
Index: perl/lib/Test/Simple/t/c_flag.t
--- /dev/null   2008-11-04 07:18:13.288883315 -0800
+++ perl/lib/Test/Simple/t/c_flag.t     2008-11-07 02:32:32.000000000 -0800
@@ -0,0 +1,21 @@
+#!/usr/bin/perl -w
+
+# Test::More should not print anything when Perl is only doing
+# a compile as with the -c flag or B::Deparse or perlcc.
+
+# HARNESS_ACTIVE=1 was causing an error with -c
+{
+    local $ENV{HARNESS_ACTIVE} = 1;
+    local $^C = 1;
+
+    require Test::More;
+    Test::More->import(tests => 1);
+
+    fail("This should not show up");
+}
+
+Test::More->builder->no_ending(1);
+
+print "1..1\n";
+print "ok 1\n";
+

==== //depot/perl/lib/Test/Simple/t/cmp_ok.t#3 (text) ====
Index: perl/lib/Test/Simple/t/cmp_ok.t
--- perl/lib/Test/Simple/t/cmp_ok.t#2~34483~    2008-10-15 06:11:04.000000000 
-0700
+++ perl/lib/Test/Simple/t/cmp_ok.t     2008-11-07 02:32:32.000000000 -0800
@@ -30,19 +30,19 @@
     $expect{error} =~ s/ at .*\n?//;
 
     local $Test::Builder::Level = $Test::Builder::Level + 1;
-    my $ok = cmp_ok($left, $cmp, $right);
-    $TB->is_num(!!$ok, !!$expect{ok});
+    my $ok = cmp_ok($left, $cmp, $right, "cmp_ok");
+    $TB->is_num(!!$ok, !!$expect{ok}, "  right return");
     
     my $diag = $err->read;
     if( !$ok and $expect{error} ) {
         $diag =~ s/^# //mg;
-        $TB->like( $diag, "/\Q$expect{error}\E/" );
+        $TB->like( $diag, qr/\Q$expect{error}\E/, "  expected error" );
     }
     elsif( $ok ) {
-        $TB->is_eq( $diag, '' );
+        $TB->is_eq( $diag, '', "  passed without diagnostic" );
     }
     else {
-        $TB->ok(1);
+        $TB->ok(1, "  failed without diagnostic");
     }
 }
 
@@ -50,6 +50,10 @@
 use Test::More;
 Test::More->builder->no_ending(1);
 
+require MyOverload;
+my $cmp = Overloaded::Compare->new("foo", 42);
+my $ify = Overloaded::Ify->new("bar", 23);
+
 my @Tests = (
     [1, '==', 1],
     [1, '==', 2],
@@ -57,23 +61,12 @@
     ["a", "eq", "a"],
     [1, "+", 1],
     [1, "-", 1],
-);
 
-# These don't work yet.
-if( 0 ) {
-#if( eval { require overload } ) {
-    require MyOverload;
-    
-    my $cmp = Overloaded::Compare->new("foo", 42);
-    my $ify = Overloaded::Ify->new("bar", 23);
-    
-    push @Tests, (
-        [$cmp, '==', 42],
-        [$cmp, 'eq', "foo"],
-        [$ify, 'eq', "bar"],
-        [$ify, "==", 23],
-    );
-}
+    [$cmp, '==', 42],
+    [$cmp, 'eq', "foo"],
+    [$ify, 'eq', "bar"],
+    [$ify, "==", 23],
+);
 
 plan tests => scalar @Tests;
 $TB->plan(tests => @Tests * 2);

==== //depot/perl/lib/Test/Simple/t/diag.t#8 (text) ====
Index: perl/lib/Test/Simple/t/diag.t
--- perl/lib/Test/Simple/t/diag.t#7~34483~      2008-10-15 06:11:04.000000000 
-0700
+++ perl/lib/Test/Simple/t/diag.t       2008-11-07 02:32:32.000000000 -0800
@@ -25,49 +25,66 @@
 
 use strict;
 
-use Test::More tests => 5;
+use Test::More tests => 7;
 
-my $Test = Test::More->builder;
+my $test = Test::Builder->create;
 
 # now make a filehandle where we can send data
 use TieOut;
 my $output = tie *FAKEOUT, 'TieOut';
 
-# force diagnostic output to a filehandle, glad I added this to
-# Test::Builder :)
-my $ret;
-{
-    local $TODO = 1;
-    $Test->todo_output(\*FAKEOUT);
-
-    diag("a single line");
 
-    $ret = diag("multiple\n", "lines");
-}
+# Test diag() goes to todo_output() in a todo test.
+{
+    $test->todo_start();
+    $test->todo_output(\*FAKEOUT);
 
-is( $output->read, <<'DIAG',   'diag() with todo_output set' );
+    $test->diag("a single line");
+    is( $output->read, <<'DIAG',   'diag() with todo_output set' );
 # a single line
+DIAG
+
+    my $ret = $test->diag("multiple\n", "lines");
+    is( $output->read, <<'DIAG',   '  multi line' );
 # multiple
 # lines
 DIAG
+    ok( !$ret, 'diag returns false' );
+
+    $test->todo_end();
+}
+
+$test->reset_outputs();
 
-ok( !$ret, 'diag returns false' );
 
+# Test diagnostic formatting
+$test->failure_output(\*FAKEOUT);
 {
-    $Test->failure_output(\*FAKEOUT);
-    $ret = diag("# foo");
+    $test->diag("# foo");
+    is( $output->read, "# # foo\n", "diag() adds # even if there's one 
already" );
+
+    $test->diag("foo\n\nbar");
+    is( $output->read, <<'DIAG', "  blank lines get escaped" );
+# foo
+# 
+# bar
+DIAG
+
+
+    $test->diag("foo\n\nbar\n\n");
+    is( $output->read, <<'DIAG', "  even at the end" );
+# foo
+# 
+# bar
+# 
+DIAG
 }
-$Test->failure_output(\*STDERR);
-is( $output->read, "# # foo\n", "diag() adds # even if there's one already" );
-ok( !$ret,  'diag returns false' );
 
 
 # [rt.cpan.org 8392]
 {
-    $Test->failure_output(\*FAKEOUT);
-    diag(qw(one two));
+    $test->diag(qw(one two));
 }
-$Test->failure_output(\*STDERR);
 is( $output->read, <<'DIAG' );
 # onetwo
 DIAG

==== //depot/perl/lib/Test/Simple/t/fail-more.t#18 (text) ====
Index: perl/lib/Test/Simple/t/fail-more.t
--- perl/lib/Test/Simple/t/fail-more.t#17~34483~        2008-10-15 
06:11:04.000000000 -0700
+++ perl/lib/Test/Simple/t/fail-more.t  2008-11-07 02:32:32.000000000 -0800
@@ -291,7 +291,7 @@
 #     expected: foo
 ERR
     My::Test::like $warnings,
-     qq[/^Argument "foo" isn't numeric in .* at $Filename line 211\\\.\n\$/];
+     qr/^Argument "foo" isn't numeric in .* at cmp_ok \[from $Filename line 
211\] line 1\.\n$/;
 
 }
 

==== //depot/perl/lib/Test/Simple/t/is_deeply_dne_bug.t#3 (text) ====
Index: perl/lib/Test/Simple/t/is_deeply_dne_bug.t
--- perl/lib/Test/Simple/t/is_deeply_dne_bug.t#2~34483~ 2008-10-15 
06:11:04.000000000 -0700
+++ perl/lib/Test/Simple/t/is_deeply_dne_bug.t  2008-11-07 02:32:32.000000000 
-0800
@@ -17,16 +17,7 @@
 }
 
 use strict;
-use Test::More;
-
-BEGIN {
-    if( !eval "require overload" ) {
-        plan skip_all => "needs overload.pm";
-    }
-    else {
-        plan tests => 2;
-    }
-}
+use Test::More tests => 2;
 
 {
     package Foo;

==== //depot/perl/lib/Test/Simple/t/is_deeply_fail.t#7 (text) ====
Index: perl/lib/Test/Simple/t/is_deeply_fail.t
--- perl/lib/Test/Simple/t/is_deeply_fail.t#6~34483~    2008-10-15 
06:11:04.000000000 -0700
+++ perl/lib/Test/Simple/t/is_deeply_fail.t     2008-11-07 02:32:32.000000000 
-0800
@@ -318,7 +318,8 @@
 ERR
 
 
-    if( eval { require overload } ) {
+    # Overloaded object tests
+    {
        my $foo = bless [], "Foo";
        my $bar = bless {}, "Bar";
 
@@ -338,9 +339,6 @@
 ERR
 
     }
-    else {
-       $TB->skip("Needs overload.pm") for 1..3;
-    }
 }
 
 

==== //depot/perl/lib/Test/Simple/t/no_plan.t#10 (text) ====
Index: perl/lib/Test/Simple/t/no_plan.t
--- perl/lib/Test/Simple/t/no_plan.t#9~34483~   2008-10-15 06:11:04.000000000 
-0700
+++ perl/lib/Test/Simple/t/no_plan.t    2008-11-07 02:32:32.000000000 -0800
@@ -16,13 +16,13 @@
 my $tb = Test::Builder->create;
 $tb->level(0);
 
-#line 19
+#line 20
 ok !eval { $tb->plan(tests => undef) };
-is($@, "Got an undefined number of tests at $0 line 19.\n");
+is($@, "Got an undefined number of tests at $0 line 20.\n");
 
-#line 23
+#line 24
 ok !eval { $tb->plan(tests => 0) };
-is($@, "You said to run 0 tests at $0 line 23.\n");
+is($@, "You said to run 0 tests at $0 line 24.\n");
 
 #line 28
 ok !eval { $tb->ok(1) };

==== //depot/perl/lib/Test/Simple/t/overload.t#6 (text) ====
Index: perl/lib/Test/Simple/t/overload.t
--- perl/lib/Test/Simple/t/overload.t#5~34483~  2008-10-15 06:11:04.000000000 
-0700
+++ perl/lib/Test/Simple/t/overload.t   2008-11-07 02:32:32.000000000 -0800
@@ -12,27 +12,26 @@
 }
 
 use strict;
-use Test::More;
-
-BEGIN {
-    if( !eval "require overload" ) {
-        plan skip_all => "needs overload.pm";
-    }
-    else {
-        plan tests => 13;
-    }
-}
+use Test::More tests => 15;
 
 
 package Overloaded;
 
 use overload
-        q{""}    => sub { $_[0]->{string} },
-        q{0+}    => sub { $_[0]->{num} };
+  q{eq}    => sub { $_[0]->{string} },
+  q{==}    => sub { $_[0]->{num} },
+  q{""}    => sub { $_[0]->{stringfy}++; $_[0]->{string} },
+  q{0+}    => sub { $_[0]->{numify}++;   $_[0]->{num}    }
+;
 
 sub new {
     my $class = shift;
-    bless { string => shift, num => shift }, $class;
+    bless {
+        string  => shift,
+        num     => shift,
+        stringify       => 0,
+        numify          => 0,
+    }, $class;
 }
 
 
@@ -49,7 +48,9 @@
 
 is $obj, 'foo',            'is() with string overloading';
 cmp_ok $obj, 'eq', 'foo',  'cmp_ok() ...';
+is $obj->{stringify}, 0, 'cmp_ok() eq does not stringify';
 cmp_ok $obj, '==', 42,     'cmp_ok() with number overloading';
+is $obj->{numify}, 0,    'cmp_ok() == does not numify';
 
 is_deeply [$obj], ['foo'],                 'is_deeply with string overloading';
 ok eq_array([$obj], ['foo']),              'eq_array ...';

==== //depot/perl/lib/Test/Simple/t/overload_threads.t#3 (text) ====
Index: perl/lib/Test/Simple/t/overload_threads.t
--- perl/lib/Test/Simple/t/overload_threads.t#2~34483~  2008-10-15 
06:11:04.000000000 -0700
+++ perl/lib/Test/Simple/t/overload_threads.t   2008-11-07 02:32:32.000000000 
-0800
@@ -18,16 +18,7 @@
     eval { require threads; 'threads'->import; 1; };
 }
 
-use Test::More;
-
-BEGIN {
-    if( !eval "require overload" ) {
-        plan skip_all => "needs overload.pm";
-    }
-    else {
-        plan tests => 5;
-    }
-}
+use Test::More tests => 5;
 
 
 package Overloaded;

==== //depot/perl/lib/Test/Simple/t/undef.t#8 (text) ====
Index: perl/lib/Test/Simple/t/undef.t
--- perl/lib/Test/Simple/t/undef.t#7~34483~     2008-10-15 06:11:04.000000000 
-0700
+++ perl/lib/Test/Simple/t/undef.t      2008-11-07 02:32:32.000000000 -0800
@@ -32,7 +32,7 @@
 }
 
 sub warnings_like {
-    $TB->like($warnings, "/$_[0]/");
+    $TB->like($warnings, $_[0]);
     $warnings = '';
 }
 
@@ -54,7 +54,7 @@
 
 #line 45
 like( undef, '/.*/',        'undef is like anything' );
-warnings_like("Use of uninitialized value.* at $Filename line 45\\.\n");
+warnings_like(qr/Use of uninitialized value.* at $Filename line 45\.\n/);
 
 eq_array( [undef, undef], [undef, 23] );
 no_warnings;
@@ -74,7 +74,7 @@
 
 #line 64
 cmp_ok( undef, '<=', 2, '  undef <= 2' );
-warnings_like("Use of uninitialized value.* at $Filename line 64\\.\n");
+warnings_like(qr/Use of uninitialized value.* at cmp_ok \[from $Filename line 
64\] line 1\.\n/);
 
 
 
End of Patch.

Reply via email to