Having problems with TAP::Harness / TAP::Parser output

Peter Leonard pete at peteleonard.com
Sat Mar 28 05:50:28 GMT 2009


Hello,

I don't know if I'm doing something wrong, but I could use some help here.

I'm trying to really get into the output of my test scripts to get a 
better idea of what's going on, but I can't seem to run tests & then 
parse output on a line-by-line basis easily.

The attached test script demonstrates what I'm trying to do - run a 
series of test scripts, and then iterate through the output on a 
line-by-line basis.  Unfortunately, what happens is that the TAP::Parser 
object doesn't seem to be able to iterate through the content.  You'll 
see that at the end, the array is empty - I'm expecting it to contain 
the line-by-line output of the tests that were run.

I *have* gotten this to work by enabling 
$ENV{PERL_TEST_HARNESS_DUMP_TAP}, and then manually loading the files 
into new TAP::Parser objects, but it's really roundabout, clunky, and a 
PITA.

Can someone please take a swing at this and explain to me what I'm doing 
wrong?

NOTE: to run this, simply drop all three files in a single dir, and run 
with "/path/to/perl test_script.pl" (I hate assuming where everyone 
posts perl, mainly because my dev perl is entirely separate from system 
perl).

Thanks,

Peter

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.hexten.net/pipermail/tapx-dev/attachments/20090328/be1ade5d/attachment.htm 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test1.t
Type: text/troff
Size: 88 bytes
Desc: not available
Url : http://www.hexten.net/pipermail/tapx-dev/attachments/20090328/be1ade5d/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test2.t
Type: text/troff
Size: 88 bytes
Desc: not available
Url : http://www.hexten.net/pipermail/tapx-dev/attachments/20090328/be1ade5d/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_script.pl
Type: application/x-perl
Size: 393 bytes
Desc: not available
Url : http://www.hexten.net/pipermail/tapx-dev/attachments/20090328/be1ade5d/attachment-0002.bin 


More information about the tapx-dev mailing list