develooper Front page | perl.qa | Postings from November 2007

Re: Providing command-line arguments to tests run via 'prove'

Thread Previous | Thread Next
From:
David E. Wheeler
Date:
November 28, 2007 12:23
Subject:
Re: Providing command-line arguments to tests run via 'prove'
Message ID:
A347D2E6-CDC7-411D-9B12-270E0E834AF4@kineticode.com
On Nov 28, 2007, at 02:17, Ovid wrote:

>> I would like to be able to provide the tests run via 'prove' with
>> options something like this:
>>
>>    some_variant_of_prove t/*.t --option1 --option2 arg1 arg2
>>
>> ... where those 4 command-line options/arguments would be available
>> to
>> *each* of the individual test files in the suite.
>
> Sorry, I just saw this.
>
> What you want is the --exec switch which, I'm embarassed to  
> realize, is
> not documented terribly well.  Oops.

Could we not add a feature to prove and/or runtests such that, any  
arguments after a bare "--" will be passed on to the scripts it runs?  
I've often wanted this myself, and --exec seems like overkill to me.

Best,

David

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About