NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Re: Useful Debugging Tip of the Day (Score:1)
For instance say test 99 of 100 starts failing and you would like to run it on its own. Is there any module that you can "use" to run only that test so that you don't see the output of the tests before or after. Something like:
use Test::More tests => 100;
use Test::Only '99';
John.
--
Re: Useful Debugging Tip of the Day (Score:2)
No, there's nothing like that. Part of the problem is that you get tests written like this:
If you change the state between tests and only run the second test (and not code before it), this fails. You could write your own prove which only shows failing tests, but that will likely lose diagnostic information since that goes to STDERR.
However, you can get this behavior if you're willing to switch to Test::Class. See Running Individual Tests [cpan.org] in the documentation. It works by setting the TEST_METHOD environment variable to a regular expression which matches only those test methods you want to run.
I have a vim mapping to automate setting the test method [perl.org].
Reply to This
Parent