On Jul 15, 2010, at 9:12 AM, Andy Lester wrote:

> Can we discuss the ways that we might get prove to recognize more than one 
> extension?
> 
> Right now, I can say
> 
>       prove --ext=.phpt --exec=/usr/local/bin/php
> 
> but I can't say
> 
>       prove --ext=.phpt --ext=.t --exec=/usr/local/bin/my-test-dispatcher

Isn't that just

--- a/lib/App/Prove.pm
+++ b/lib/App/Prove.pm
@@ -214,7 +214,7 @@ sub process_args {
             'count!'       => \$self->{show_count},
             'c'            => \$self->{color},
             'D|dry'        => \$self->{dry},
-            'ext=s'        => \$self->{extension},
+            'ext=s+'       => \$self->{extension},
             'harness=s'    => \$self->{harness},
             'ignore-exit'  => \$self->{ignore_exit},
             'source=s@'    => $self->{sources},

?

> Or even better
> 
>       prove --ext=.t=/usr/local/bin/perl --ext=.phpt=/usr/local/bin/php

  prove --source PHP --php-option suffix=phpt --php-option 
command=/usr/local/bin/php

But then you'll need to write a PHP handler. Brief intro:

  
http://www.justatheory.com/computers/programming/perl/tap-parser-sourcehandler.html

> The ability to run .t and .phpt tests is a Big Deal to me here at work, and 
> is something that hss never worked since I originally ported our test script 
> "smoke" to be the generic prove we know today.  Now, we're trying to fold 
> back, but this feature missing makes those I'd convert to prove very sad.

It should be pretty easy to write a PHP handler based on my example Ruby 
handler.

Best,

David


Reply via email to