more useful options | |
PerlMonks |
Using externally generated TAP to drive a testby creamygoodness (Curate) |
on Sep 05, 2008 at 19:33 UTC ( [id://709376]=perlquestion: print w/replies, xml ) | Need Help?? |
creamygoodness has asked for the wisdom of the Perl Monks concerning the following question: Let's say I've got a string containing some TAP output:
In real life, the source for the TAP output is a compiled C app that generates TAP, but we can simulate it using a plain old string for demo purposes. I can feed the $tap string to a TAP::Parser object:
The goal is to wrap the compiled test app with a Perl script and run it as part of a test suite. I've been able to get the TAP::Parser object to iterate over the lines in the TAP string. However, I haven't been able to figure out how to extract clean test results. Here's a coarse attempt:
... and here's the garbled output it produces:
Is this something that I should be able to use TAP::Parser for, or am I barking up the wrong tree? I actually feel like the result-by-result approach of that test script is completely wrong -- I'd need to add more cases for TODO tests, SKIP directives, etc. The script really ought to look something like this:
Suggestions?
Back to
Seekers of Perl Wisdom
|
|