Skip Menu |
 

This queue is for tickets about the Test-Harness CPAN distribution.

Report information
The Basics
Id: 20631
Status: resolved
Priority: 0/
Queue: Test-Harness

People
Owner: Nobody in particular
Requestors: cpan [...] audreyt.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: [PATCH] prove --perl was broken.
...it didn't take a value. :)
Subject: prove.diff
Download prove.diff
text/x-diff 489b
--- prove.orig 2006-07-23 02:06:22.000000000 -0400 +++ prove 2006-07-23 02:06:32.000000000 -0400 @@ -37,7 +37,7 @@ 'H|man' => sub {pod2usage({-verbose => 2}); exit}, 'I=s@' => \@includes, 'l|lib' => \$lib, - 'perl' => \$ENV{HARNESS_PERL}, + 'perl=s' => \$ENV{HARNESS_PERL}, 'r|recurse' => \$recurse, 's|shuffle' => \$shuffle, 't' => sub { unshift @switches, "-t" }, # Always want -t up front
I just hit this as well. Here's a patch with tests.
Download prove__perl.patch
text/x-diff 4.4k
=== Changes ================================================================== --- Changes (revision 4319) +++ Changes (local) @@ -5,7 +5,11 @@ * Added test straps overload via HARNESS_STRAP_OVERLOAD environment variable. prove now takes a --strap=class parameter. Thanks, Adam Kennedy. + * prove --debug now shows what perl it will run the tests with. + [FIXES] + * prove's --perl argument now works. + 2.63_01 Fri Jun 30 16:59:50 CDT 2006 [ENHANCEMENTS] * Failed tests used to say "NOK x", and now say "NOK x/y". === bin/prove ================================================================== --- bin/prove (revision 4319) +++ bin/prove (local) @@ -37,7 +37,7 @@ 'H|man' => sub {pod2usage({-verbose => 2}); exit}, 'I=s@' => \@includes, 'l|lib' => \$lib, - 'perl' => \$ENV{HARNESS_PERL}, + 'perl=s' => \$ENV{HARNESS_PERL}, 'r|recurse' => \$recurse, 's|shuffle' => \$shuffle, 't' => sub { unshift @switches, "-t" }, # Always want -t up front @@ -71,7 +71,13 @@ # Build up TH switches push( @switches, map { /\s/ && !/^".*"$/ ? qq["-I$_"] : "-I$_" } @includes ); $Test::Harness::Switches = join( " ", @switches ); -print "# \$Test::Harness::Switches: $Test::Harness::Switches\n" if $Test::Harness::debug; +if( $Test::Harness::debug ) { + my $perl = $ENV{HARNESS_PERL} || $^X; + print <<"END_OF_DEBUG"; +# \$Test::Harness::Switches: $Test::Harness::Switches +# perl to run tests: $perl +END_OF_DEBUG +} @ARGV = File::Spec->curdir unless @ARGV; my @argv_globbed; === t/prove-switches.t ================================================================== --- t/prove-switches.t (revision 4319) +++ t/prove-switches.t (local) @@ -18,7 +18,7 @@ # http://rt.perl.org/rt3/Ticket/Display.html?id=30952. plan skip_all => "Skipping because of a Cygwin bug" if ( $^O =~ /cygwin/i ); -plan tests => 5; +plan tests => 6; my $blib = File::Spec->catfile( File::Spec->curdir, "blib" ); my $blib_lib = File::Spec->catfile( $blib, "lib" ); @@ -28,43 +28,61 @@ CAPITAL_TAINT: { local $ENV{PROVE_SWITCHES}; - local $/ = undef; my @actual = qx/$prove -Ifirst -D -I second -Ithird -Tvdb/; - my @expected = ( "# \$Test::Harness::Switches: -T -I$blib_arch -I$blib_lib -Ifirst -Isecond -Ithird\n" ); + my @expected = ( + "# \$Test::Harness::Switches: -T -I$blib_arch -I$blib_lib -Ifirst -Isecond -Ithird\n", + "# perl to run tests: $^X\n" + ); is_deeply( \@actual, \@expected, "Capital taint flags OK" ); } LOWERCASE_TAINT: { local $ENV{PROVE_SWITCHES}; - local $/ = undef; my @actual = qx/$prove -dD -Ifirst -I second -t -Ithird -vb/; - my @expected = ( "# \$Test::Harness::Switches: -t -I$blib_arch -I$blib_lib -Ifirst -Isecond -Ithird\n" ); + my @expected = ( + "# \$Test::Harness::Switches: -t -I$blib_arch -I$blib_lib -Ifirst -Isecond -Ithird\n", + "# perl to run tests: $^X\n" + ); is_deeply( \@actual, \@expected, "Lowercase taint OK" ); } PROVE_SWITCHES: { local $ENV{PROVE_SWITCHES} = "-dvb -I fark"; - local $/ = undef; my @actual = qx/$prove -Ibork -Dd/; - my @expected = ( "# \$Test::Harness::Switches: -I$blib_arch -I$blib_lib -Ifark -Ibork\n" ); + my @expected = ( + "# \$Test::Harness::Switches: -I$blib_arch -I$blib_lib -Ifark -Ibork\n", + "# perl to run tests: $^X\n" + ); is_deeply( \@actual, \@expected, "PROVE_SWITCHES OK" ); } PROVE_SWITCHES_L: { - local $/ = undef; - my @actual = qx/$prove -l -Ibongo -Dd/; - my @expected = ( "# \$Test::Harness::Switches: -Ilib -Ibongo\n" ); + my @expected = ( + "# \$Test::Harness::Switches: -Ilib -Ibongo\n", + "# perl to run tests: $^X\n" + ); is_deeply( \@actual, \@expected, "PROVE_SWITCHES OK" ); } PROVE_SWITCHES_LB: { - local $/ = undef; - my @actual = qx/$prove -lb -Dd/; - my @expected = ( "# \$Test::Harness::Switches: -Ilib -I$blib_arch -I$blib_lib\n" ); + my @expected = ( + "# \$Test::Harness::Switches: -Ilib -I$blib_arch -I$blib_lib\n", + "# perl to run tests: $^X\n" + ); is_deeply( \@actual, \@expected, "PROVE_SWITCHES OK" ); } + + +PROVE_SWITCHES_PERL: { + my @actual = qx/$prove --perl=wibble -Dd/; + my @expected = ( + "# \$Test::Harness::Switches: \n", + "# perl to run tests: wibble\n" + ); + is_deeply( \@actual, \@expected, "PROVE_SWITCHES OK" ); +}
Resolved in 2.64


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.