| Sometimes when writing tests, some tests may fail. You can mark these tests as TODO with Test::More, but this is only convenient for a single range of tests.
Sometimes a few tests may fail inside a set of nested loops. But marking them in the flow of the program is very complicated.
This little sub allows you to specify which tests are supposed to fail, specified by test number and reason for the failure. For example:
my %todo = (
1023 => "d f g still fails, but it's not that important",
1567 => 'yikes, we need to fix this one!',
);
foreach my $foo (@foo) {
foreach my $bar (@bar) {
foreach my $car (@car) {
todo_some( \%todo,\&ok,func($foo,$bar,$car),"check result
+of function" );
}
}
}
|