On Tue, Jun 10, 2008 at 12:28 AM, Gabor Szabo <[EMAIL PROTECTED]> wrote: > The issue I am trying to solve is how to catch and report > when a test suit gives any warnings?
Are there situations where a test suite should give warnings? I.e. stuff that the user should see that shouldn't get swallowed by the harness running in a quiet (not verbose) mode? For example, I have some tests in CPAN::Reporter that test timing out a command. Since that could look like a test has hung (to an impatient tester) I make a point to use warn to flag to the user that the test is sleeping for a timeout test. Looks like this: $ Build test --test_files=t/13_record_command.t t/13_record_command......18/37 # sleeping for timeout test t/13_record_command......22/37 # sleeping for timeout test t/13_record_command......26/37 # sleeping for timeout test t/13_record_command......ok All tests successful. Files=1, Tests=37, 19 wallclock secs ( 0.01 usr 0.01 sys + 6.51 cusr 2.06 csys = 8.59 CPU) So is there a better way to do this than warn? That said, if you try this at home (with Proc::ProcessTable), you'll also get a lovely warning from Proc::ProcessTable having a non-portable v-string. That is a warning that should perhaps be fixed, though it turns out to be upstream. Should I clutter my code with stuff to suppress it? Maybe. But I don't see how I can have the one without the other. --David
