[tap-l] Inter-stream punctuation

Andy Armstrong andy at hexten.net
Mon Mar 19 17:50:28 GMT 2007


Given that TAP is streaming I wonder if it might ever be useful to be  
able to concatenate a number of TAP streams and have the harness be  
able to work out that the single stream represented multiple tests?

Case: I'm working on a PHP implementation of a YAMLish writer. I'm  
writing the individual tests in PHP and I'd like to be able to write  
a single Perl test wrapper that runs the PHP tests one after another.

t/wrapper.t    		<-- Perl, runs these:
    t/010-load.php	<-- PHP, outputs TAP
    t/020-writer.php	<-- Ditto

Life would be much easier if the Perl wrapper could output a single  
stream with some kind of inter-tap marker between the output of the  
individual test scripts.

I can see that it might simplify network testing also to be able to  
send a single TAP stream that represents the output from multiple tests.

It could just be something like this:

   from t/010-load.php
   plan 1..1
   ok 1 loaded OK
   from t/020-writer.php
   plan 1..2
   ok 1 simple case: output OK
   ok 2 nested hash: output OK

Of course you could argue that that intersects to some extent with  
the idea of being able to group tests. If you can have groups of  
tests each of which has their own plan then that pretty much solves  
the problem.

-- 
Andy Armstrong, hexten.net



More information about the tap-l mailing list