in reply to Passing arguments to tests using prove

Works for me
#!/usr/bin/perl -- use strict; use warnings; if(not $ENV{VROOM} ){ $ENV{VROOM}=1; use File::Spec; my $self = File::Spec->rel2abs(__FILE__); my $dir = "my_dir"; system("prove -v $self :: --input=$dir"); system('prove', '-v', $self ,'::', "--input=$dir"); } else { use Test::More; use Getopt::Long; plan tests => 1; my $input; GetOptions( "input=s" => \$input ); ok( $input, "got input=$input" ); }
$ pmvers Test::More App::Prove Getopt::Long Test::More: 0.94 App::Prove: 3.17 Getopt::Long: 2.38 $ prove -V TAP::Harness v3.17 and Perl v5.10.1

Replies are listed 'Best First'.
Re^2: Passing arguments to tests using prove
by mice (Initiate) on Sep 21, 2009 at 16:17 UTC
    Thanks a lot for your reply! Tried your code, but am still getting "Unknown option: input" when I run it... Hm.
      Do you see how I provided you with version information? You need to do the same :) Its diagnostic