Andy Armstrong wrote:
> It is done :)
> 
>   http://hexten.net/tapx/r867/Test-Harness-3.04.tar.gz
> 
> or
> 
>   svn co http://svn.hexten.net/tapx/trunk
> 
> =head2 Arguments to Tests
> 
> It is possible to supply arguments to tests. To do so separate them from
> prove's own arguments with '--'. For example
> 
>  prove -v t/mytest.t -- --url http://example.com
> 
> would run F<t/mytest.t> with the options '--url http://example.com'.
> When running multiple tests they will each receive the same arguments.

Sorry, I came in late.

There's nothing about '--' which indicates "pass the rest through to the
tests".  As such, I think it's a poor choice.  About all it has going for it
is you don't have to quote things.

In fact, it normally means "stop processing the following as switches and
instead treat them as files".  By that reading I'd guess your command line
above would mean "run the test files t/mytest.t, --url and
http://example.com";.  In fact, if we use -- to mean something other than to
stop parsing switches, how do we run files that look like switches?

Why isn't this just:

        prove -v t/mytest.t --test_args='--url http://example.com'

It's clear, it's unambiguous, it allows -- to mean what it's supposed to mean.


-- 
Insulting our readers is part of our business model.
        http://somethingpositive.net/sp07122005.shtml

Reply via email to