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

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

Thread Previous | Thread Next
From:
A. Pagaltzis
Date:
November 28, 2007 19:10
Subject:
Re: Providing command-line arguments to tests run via 'prove'
Message ID:
20071129031012.GK705@klangraum
* Andy Armstrong <andy@hexten.net> [2007-11-29 04:02]:
> I agree re the semantics of '--' - but I'd rather have a
> sentinel than a quoted string. Having to get nested quoting
> right is a bit of cognitive load we can spare people from.
>
> So:
>
> * Andy's --testargs has the disadvantage of being visually
>   indistinct from regular args
> * '--' has another meaning by convention
>
> How about some other short, not arg like, shell safe punctuation sequence?
>
> $ prove -v t/sprocket.t -+ --teeth 12

How about a double colon?

    $ prove -v t/sprocket.t :: --teeth 12

It’s quite unlikely that anyone would name a test file `::`. In
fact no one who has to care about Windows at all (which would be
everyone who isn’t writing (Linux|Mac|BSD)::* modules) would want
to do that because on Windows you *can’t* name a file `::`.

(A single colon would do just as well, but might get visually lost
in a long `prove` invocation.)

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

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