Jim Cromie wrote:
Well, it seems Ive been abusing diag() for some time now :-O
Is there a 'right' way to do this ? perhaps just using ok() ?
ok() goes to stdout by default, diag() to stderr
which is, I presume, why perl -Ilib t/foo.t produces more output than make test.
I see that as a feature. I guess note() should go to stderr - for my preferences at least.
I guess I should just do it here, and see how it turns out ;-)
or maybe a new function, ex: note() is better:
note......................................ok# YOUR INFORMATIONAL MESSAGE HERE
if that goes to stdout, that won't appear in the default harness output
Im not sure whether you regard this as a problem or a feature.
Since Ive been using diag() to denote groups of tests,
which separates chunks of foo ................. ok,
But this appears to be precisely what RGS doesnt like.
Or use separate .t files ?
for some cases, thats overkill. For example, Ive got several sets of
2-nested for loops doing a single tests combinatorially with 2 options. The loops are so similar, it seems silly to put them in separate files.
the diag()s just helped me find the broken tests.
Hence ive UPCASEd the note to give it some of the visual distinction that I got from diag(), hopefully w/o the annoyance.
Is this worthwhile ? If so, Ill work up a patch
even with it in - theres a long delay before it becomes ubiquitious, so it cant be used with out dependency consequences.