The following patch allows one to add 'TODO' tests to lib/warning tests. Abigail --- lib/warnings.t.orig Tue Sep 30 23:10:53 2003 +++ lib/warnings.t Tue Sep 30 23:51:55 2003 @@ -76,6 +76,7 @@ $switch =~ s/(-\S*[A-Z]\S*)/"$1"/ if $Is_VMS; # protect uc switches } my($prog,$expected) = split(/\nEXPECT\n/, $_); + my $todo = $prog =~ s/^#\s*TODO\s*\n//m; if ( $prog =~ /--FILE--/) { my(@files) = split(/\n--FILE--\s*([^\s\n]*)\s*\n/, $prog) ; shift @files ; @@ -177,12 +178,21 @@ (!$option_regex && $results !~ /^\Q$expected/))) or (!$prefix && (( $option_regex && $results !~ /^$expected/) || (!$option_regex && $results ne $expected)))) { - print STDERR "PROG: $switch\n$prog\n"; - print STDERR "EXPECTED:\n$expected\n"; - print STDERR "GOT:\n$results\n"; + my $err_line = "PROG: $switch\n$prog\n" . + "EXPECTED:\n$expected\n" . + "GOT:\n$results\n"; + if ($todo) { + $err_line =~ s/^/# /mg if $todo; + print $err_line; # Harness can't filter it out from STDERR. + } + else { + print STDERR $err_line; + } print "not "; } - print "ok " . ++$i . "\n"; + print "ok " . ++$i; + print " # TODO" if $todo; + print "\n"; foreach (@temps) { unlink $_ if $_ } foreach (@temp_path)Thread Previous | Thread Next