Skip Menu |

This queue is for tickets about the Test-Harness CPAN distribution.

Report information
The Basics
Id: 15485
Status: rejected
Priority: 0/
Queue: Test-Harness

People
Owner: Nobody in particular
Requestors: mcmahon [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: prove -v and no_plan give bad TAP output
For this test file: use Test::More qw(no_plan); ok 1, "wrong line"; With Perl alone: wallflower 11:57:59 ~ $ perl sample.t ok 1 - wrong line 1..1 (This is correct; ok 1 comes on its own line) With prove -v: wallflower 11:58:11 ~ $ prove -v sample.t sample....ok 1 - wrong line 1..1 ok All tests successful. Files=1, Tests=1, 0 wallclock secs ( 0.04 cusr + 0.00 csys = 0.04 CPU) (First 'ok' line is on the wrong line.) This makes it difficult for a Straps-based TAP post-processor to read the TAP output and get it right. (Why am I processing it twice? Historical reasons.)
Date: Wed, 2 Nov 2005 20:51:37 -0800
From: Michael G Schwern <schwern [...] pobox.com>
To: Joe McMahon via RT <bug-Test-Harness [...] rt.cpan.org>
CC: undisclosed-recipients: ;
Subject: Re: [cpan #15485] prove -v and no_plan give bad TAP output
RT-Send-Cc:
On Wed, Nov 02, 2005 at 03:02:46PM -0500, Joe McMahon via RT wrote: Show quoted text
> With prove -v: > wallflower 11:58:11 ~ $ prove -v sample.t > sample....ok 1 - wrong line > 1..1 > ok > All tests successful. > Files=1, Tests=1, 0 wallclock secs ( 0.04 cusr + 0.00 csys = 0.04 CPU) > (First 'ok' line is on the wrong line.) > > This makes it difficult for a Straps-based TAP post-processor to read the TAP output and get it right. (Why am I processing it twice? Historical reasons.)
The output of -v isn't really ment to be parsed. Its going to have all sorts of crap intermingled with it. I'm trying to imagine a scenario where you want to post process the output of prove rather than just run the tests yourself (perhaps with Test::Harness::Straps->analyze_file). Could you fill that in? -- Michael G Schwern schwern@pobox.com http://www.pobox.com/~schwern Reality is that which, when you stop believing in it, doesn't go away. -- Phillip K. Dick