From 76220d5e23b8dfc7d1b0accf1b99c079f0b43419 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Wed, 2 Mar 2011 13:46:10 +0000 Subject: [PATCH] Fix the TODO handling in t/re/ReTest.pl's skip() It now does TODO & SKIP. However, currently I believe that nothing that uses it is calling skip() with a TODO test. --- t/re/ReTest.pl | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/t/re/ReTest.pl b/t/re/ReTest.pl index 766065c..fc25087 100644 --- a/t/re/ReTest.pl +++ b/t/re/ReTest.pl @@ -102,16 +102,20 @@ sub skip { safe_globals(); $why =~ s/\n.*//s; $why .= "; Bug $BugId" if defined $BugId; - # seems like the new harness code doesn't like todo and skip to be mixed. - # which seems like a bug in the harness to me. -- dmq - #$why .= " # TODO $TODO" if defined $TODO; - + my $ok; + if (defined $TODO) { + $why = "TODO & SKIP $why $TODO"; + $ok = "not ok"; + } else { + $why = "SKIP $why"; + $ok = "ok"; + } + my $n = shift // 1; my $line_nr = (caller(0)) [2]; for (1 .. $n) { ++ $test; - #print "not " if defined $TODO; - print "ok $test # skip $why\tLine $line_nr\n"; + print "$ok $test # $why\tLine $line_nr\n"; } no warnings "exiting"; last SKIP; -- 2.7.4