in reply to Skip Vs. Fail
"Todo" tests might be of interest to you. from perldoc Test::More
TODO: { local $TODO = "URI::Geller not finished"; my $card = "Eight of clubs"; is( URI::Geller->your_card, $card, 'Is THIS your card?' ); my $spoon; URI::Geller->bend_spoon; is( $spoon, 'bent', "Spoon bending, that's original" ); }
With a todo block, the tests inside are expected to fail. Test::More will run the tests normally, but print out special flags indicating they are "todo". Test::Harness will interpret failures as being ok. Should anything succeed, it will report it as an unexpected success. You then know the thing you had todo is done and can remove the TODO flag.
There's a distinction between TODO tests and SKIP tests, in that TODO tests are actually run, but SKIP tests are not.
Conditional skips are used for tests that are a) inappropriate for the platform, b) inappropriate for the user's responses to questions in Makefile.PL or Build.PL c) an optional module is not installed. Sometimes you might skip the whole .t file with plan skip_all => reason.
TODO tests are for "scaffolding" - code that hasn't been written yet, and tests are expected to fail. TODO tests that fail more severely, such as dieing, can be avoided with todo_skip (see the docs).
Hope this helps
--
Oh Lord, won’t you burn me a Knoppix CD ?
My friends all rate Windows, I must disagree.
Your powers of persuasion will set them all free,
So oh Lord, won’t you burn me a Knoppix CD ?
(Missquoting Janis Joplin)
|
|---|