In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/fdec8735b5a913c856025793c0239d908ad4bc2e?hp=9924e635effbf0beeff7c2e2ad828241da616e10>

- Log -----------------------------------------------------------------
commit fdec8735b5a913c856025793c0239d908ad4bc2e
Author: Steve Hay <[email protected]>
Date:   Mon Oct 12 00:30:06 2009 +0100

    Implement TODO support locally in t/comp/opsubs.t
    
    Removes the FAILED for test 22 on Win32.
-----------------------------------------------------------------------

Summary of changes:
 t/comp/opsubs.t |   35 ++++++++++++++++++++++++++++++-----
 1 files changed, 30 insertions(+), 5 deletions(-)

diff --git a/t/comp/opsubs.t b/t/comp/opsubs.t
index bfb6c3f..89b1af5 100644
--- a/t/comp/opsubs.t
+++ b/t/comp/opsubs.t
@@ -12,7 +12,12 @@ my $test = 0;
 sub failed {
     my ($got, $expected, $name) = @_;
 
-    print "not ok $test - $name\n";
+    if ($::TODO) {
+       print "not ok $test - $name # TODO: $::TODO\n";
+    }
+    else {
+       print "not ok $test - $name\n";
+    }
     my @caller = caller(1);
     print "# Failed test at $caller[1] line $caller[2]\n";
     if (defined $got) {
@@ -28,7 +33,12 @@ sub like {
     my ($got, $pattern, $name) = @_;
     $test = $test + 1;
     if (defined $got && $got =~ $pattern) {
-       print "ok $test - $name\n";
+       if ($::TODO) {
+           print "ok $test - $name # TODO: $::TODO\n";
+       }
+       else {
+           print "ok $test - $name\n";
+       }
        # Principle of least surprise - maintain the expected interface, even
        # though we aren't using it here (yet).
        return 1;
@@ -40,7 +50,12 @@ sub is {
     my ($got, $expect, $name) = @_;
     $test = $test + 1;
     if (defined $got && $got eq $expect) {
-       print "ok $test - $name\n";
+       if ($::TODO) {
+           print "ok $test - $name # TODO: $::TODO\n";
+       }
+       else {
+           print "ok $test - $name\n";
+       }
        return 1;
     }
     failed($got, "'$expect'", $name);
@@ -50,7 +65,12 @@ sub isnt {
     my ($got, $expect, $name) = @_;
     $test = $test + 1;
     if (defined $got && $got ne $expect) {
-       print "ok $test - $name\n";
+       if ($::TODO) {
+           print "ok $test - $name # TODO: $::TODO\n";
+       }
+       else {
+           print "ok $test - $name\n";
+       }
        return 1;
     }
     failed($got, "not '$expect'", $name);
@@ -60,7 +80,12 @@ sub can_ok {
     my ($class, $method) = @_;
     $test = $test + 1;
     if (eval { $class->can($method) }) {
-       print "ok $test - $class->can('$method')\n";
+       if ($::TODO) {
+           print "ok $test - $class->can('$method') # TODO: $::TODO\n";
+       }
+       else {
+           print "ok $test - $class->can('$method')\n";
+       }
        return 1;
     }
     my @caller = caller;

--
Perl5 Master Repository

Reply via email to