Gabor Szabo wrote: > that is, under Harness there is an extra empty row > between the not ok line and the explanation line: > # Failed test at a.t line 7. > > Is this intentional? > If not should this be fixed?
Yes, it is intentional. Its the difference between this: $ prove ~/tmp/foo.t /Users/schwern/tmp/foo....1/3 # Failed test at /Users/schwern/tmp/foo.t line 7. # got: '23' # expected: '42' # Looks like you failed 1 test of 3. and this: $ prove ~/tmp/foo.t /Users/schwern/tmp/foo....1/3 # Failed test at /Users/schwern/tmp/foo.t line 7. # got: '23' # expected: '42' # Looks like you failed 1 test of 3. And it keys off $ENV{HARNESS_ACTIVE}. So if you want consistent output, set that manually, probably to 0. I'm loathe to document it because A) it's a sort of transient Test::Harness specific feature and B) it has to do with comment formatting which I'm always loathe to write down the details of let people start relying on it. Which leads to the conclusion that you test is doomed to break in the future anyway, because you're parsing comments. If your intention is to test a failing test, instead use the output() and failure_output() methods of Test::Builder to redirect it to a tied filehandle. -- 185. My name is not a killing word. -- The 213 Things Skippy Is No Longer Allowed To Do In The U.S. Army http://skippyslist.com/list/