[tap-l] Pragmas

Andy Armstrong andy at hexten.net
Thu Apr 17 11:10:49 UTC 2008


On 17 Apr 2008, at 09:24, Ovid wrote:
> I do like the syntax, but can you give a use case here?  I could
> imagine the harness wanting to ignore exit codes if it cannot reliably
> determine them (reading TAP from an archive), but I'm unclear about  
> the
> producer directing this.  However, even the slightest use case is
> tempting.

The specific use case was that prompted this was a set of tests in  
parrot/languages/perl6 that are munged through a pre-processor  
('fudge') that Larry wrote that alters the test to return a true value  
to indicate that it's been munged.

More generally one can conceive of programs that could be modified to  
emit TAP when they see a --test switch but whose exit value already  
has some other meaning which can't conveniently be overloaded. The  
advantage of the pragma is that such programs can still be self- 
contained testable entities; no need for a wrapper to discard the exit  
status.

> That being said, I'm not entirely sure I like that test success/ 
> failure
> is dependent on exit codes as that's "out of band" information.


Yeah, agree. But that's probably a convention we're stuck with, no?

-- 
Andy Armstrong, Hexten






More information about the tap-l mailing list