mice has asked for the wisdom of the Perl Monks concerning the following question:
Hi all,
I'm trying to pass the same argument to all tests in a directory. The perl docs tell me to use:
prove -v t/mytest.t :: --input http://example.com
But whenever I do that I get "Unknown option: input".
Here's a simplied version of my code:
use Test::Harness; my $dir = "my_dir" system("prove -v tests/at_test_level.t :: --input=$dir");
use Test::More tests => 1; use Getopt::Long; use warnings; my $input; GetOptions( "input=s" => \$input ); ok( 1==1, 'test 1 ok' );
I'm new-ish to perl, so it's probably something straightforward. Your help is appreciated!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Passing arguments to tests using prove
by Anonymous Monk on Sep 21, 2009 at 15:41 UTC | |
by mice (Initiate) on Sep 21, 2009 at 16:17 UTC | |
by Anonymous Monk on Sep 21, 2009 at 16:33 UTC | |
|
Re: Passing arguments to tests using prove
by ELISHEVA (Prior) on Sep 21, 2009 at 20:46 UTC |