Rodent of Unusual Size wrote:

Stas Bekman wrote:

Which means that we should gradually change all the tests
to start the comments with '#', or they may break in the future.


Does that include things like the "debug: " messages in expires.t? Or are such immune or don't count?

Anything that you print to STDOUT, which then can interfere with some already reserved patterns and those that may be introduced in the future versions of Test::Harness.


Apache::Test is a very elaborate framework, but at the end all the output it generates is fed to Test::Harness, which used not to care about comments without leading # (at least as long as I remember using it). I guess that sometimes parts of the debug comment may be interpreted as a control stream like in: 'testing ok 1' , which can be interpreted as 'ok 1', when you just meant a comment.

Also take a look at the tests using t_cmp() from Apache::TestUtil, it saves you a lot of typing and I'm planning to change it to print the debug statements only if the sub-test fails. It will also handle the # thing soon, so the test doesn't look cluttered and easy to read. Just say:

use Apache::TestUtil;
ok t_cmp($expected, $received, "comment");

Also see the doc I'm working on referenced from perl-framework/Apache-Test/README, it covers this and other things.

_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/



Reply via email to