Skip Menu |

This queue is for tickets about the Devel-SharedLibs CPAN distribution.

Report information
The Basics
Id: 110770
Status: resolved
Estimated: 5 min
Worked: 5 min
Priority: 0/
Queue: Devel-SharedLibs

People
Owner: LEMBARK [...] cpan.org
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

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



Subject: t/01-NoPrint.t and t/02-Print.t should use $^X
... otherwise tests fail on installations where the currently tested perl is not first in user's $ENV{PATH}. Fix could look like this: diff --git a/t/01-NoPrint.t b/t/01-NoPrint.t index ce1cb95..c0a50f3 100644 --- a/t/01-NoPrint.t +++ b/t/01-NoPrint.t @@ -13,7 +13,7 @@ my $exec = $test_dir . '/bin/exec-stdout'; -e $exec or BAIL_OUT "Missing test exec: '$exec'"; -chomp ( my @output = qx( $exec 2>&1 ) ); +chomp ( my @output = qx( $^X $exec 2>&1 ) ); note "Output: $print = $ENV{ $print }\n", explain \@output; diff --git a/t/02-Print.t b/t/02-Print.t index b0bc686..c12373b 100644 --- a/t/02-Print.t +++ b/t/02-Print.t @@ -13,7 +13,7 @@ my $exec = $test_dir . '/bin/exec-stdout'; -e $exec or BAIL_OUT "Missing test exec: '$exec'"; -chomp( my @output = qx( $exec 2>&1 ) ); +chomp( my @output = qx( $^X $exec 2>&1 ) ); note "Output: $print = $ENV{ $print }\n", explain \@output;
On Wed Dec 30 05:54:05 2015, SREZIC wrote: Show quoted text
> ... otherwise tests fail on installations where the currently tested > perl is not first in user's $ENV{PATH}. Fix could look like this: > > diff --git a/t/01-NoPrint.t b/t/01-NoPrint.t > index ce1cb95..c0a50f3 100644 > --- a/t/01-NoPrint.t > +++ b/t/01-NoPrint.t > @@ -13,7 +13,7 @@ my $exec = $test_dir . '/bin/exec-stdout'; > > -e $exec or BAIL_OUT "Missing test exec: '$exec'"; > > -chomp ( my @output = qx( $exec 2>&1 ) ); > +chomp ( my @output = qx( $^X $exec 2>&1 ) ); > > note "Output: $print = $ENV{ $print }\n", explain \@output; > > diff --git a/t/02-Print.t b/t/02-Print.t > index b0bc686..c12373b 100644 > --- a/t/02-Print.t > +++ b/t/02-Print.t > @@ -13,7 +13,7 @@ my $exec = $test_dir . '/bin/exec-stdout'; > > -e $exec or BAIL_OUT "Missing test exec: '$exec'"; > > -chomp( my @output = qx( $exec 2>&1 ) ); > +chomp( my @output = qx( $^X $exec 2>&1 ) ); > > note "Output: $print = $ENV{ $print }\n", explain \@output; >
Good point.