On Wed, Oct 01, 2003 at 12:07:26AM +0200, Abigail wrote: > The following patch allows one to add 'TODO' tests to lib/warning > tests. My development environment is a little screwy at the moment, so I can't submit a proper patch, but... > --- 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; This would be more useful as: my $todo = 0; my $todo_reason = ''; if( $prog =~ s/^#\s*TODO\s*(.*)\n//m; ) { $todo = 1; $todo_reason = $1; } Allowing one to write something like: # TODO perlbug 202981 so we know why its TODO. > - print "ok " . ++$i . "\n"; > + print "ok " . ++$i; > + print " # TODO" if $todo; > + print "\n"; And to display the reason: print " # TODO $todo_reason" if $todo;