SourceDetector

David E. Wheeler david at kineticode.com
Sat Sep 5 23:59:28 BST 2009


On Sep 5, 2009, at 10:43 AM, Steve Purkis wrote:

>> http://github.com/theory/Test-Harness/commit/8da53e4adeefc4a32bf3ce0bad1b0e65f6bef965
>>
>> I especially like that I was able to do it with just two methods in  
>> the subclass. Nice!
>
> Nice - 3h to write a new detector/handler including tests is pretty  
> good!

Yes, I was happy with it.

> Glad you're happy with the API.  It's definitely a lot more simple  
> now, thanks to your suggestions for a better API.

Thanks! One thing I did notice, though: are the Executable tests  
actually executing a script? Because if so, only the .bat will work in  
Win32. The tests need to take that into consideration.

>> Yep. I think It should be pretty simple to document adding a new  
>> detector. I mean handler.
>
> I've done a lot as I went, so hopefully it's almost ready for  
> review.  If someone feels like whipping up some examples for M::B &  
> EU::MM for TAP::Harness, that'd be really helpful.

My patch to add TAP::Harness support to EU::MM was rejected (because  
EU::MM is near EOL). I included an example of a Build.PL usage in  
SourceDetector::pgTAP.

> That's done now.  You can now do:
>
> perl -Ilib bin/prove --source_handler Foo --source_hander Bar t
> perl -Ilib bin/prove --source_handler 'File: {extensions: [.1]}' t/ 
> source_tests/source.1

Cool, though why the underscore? Better yet, why the "handler" bit.  
How about just --source Foo?

>> Thanks again, Steve, this is awesome.
>
> No problem - one last push, and we should finally be able to get  
> this out the door.

Yay!

BTW what's the consensus on including the pgTAP handler in the  
distribution? I'm fine either way: I think it makes a good example to  
include, but I'm fine to also make it its own distribution. Thoughts?

Best,

David



More information about the tapx-dev mailing list