Skip to content

Commit

Permalink
Allow for executable extension in tainted test
Browse files Browse the repository at this point in the history
  • Loading branch information
Leont committed Nov 13, 2013
1 parent 34cf656 commit 4fd0db4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions t/11-tainted.t
Expand Up @@ -8,7 +8,7 @@ use Test::More;
use Config; use Config;
use Devel::FindPerl qw/find_perl_interpreter perl_is_same/; use Devel::FindPerl qw/find_perl_interpreter perl_is_same/;


my $perlpath = join '', @Config{qw/perlpath exe_ext/}; my $perlpath = $Config{perlpath};
plan(skip_all => 'Taint test can\'t be run from uninstalled perl') if $ENV{PERL_CORE}; plan(skip_all => 'Taint test can\'t be run from uninstalled perl') if $ENV{PERL_CORE};
plan(skip_all => 'Taint test can\'t be run for relocatable perl') if $Config{userelocatableinc}; plan(skip_all => 'Taint test can\'t be run for relocatable perl') if $Config{userelocatableinc};
plan(skip_all => "Perl not in perlpath '$perlpath'") unless -x $perlpath and perl_is_same($perlpath); plan(skip_all => "Perl not in perlpath '$perlpath'") unless -x $perlpath and perl_is_same($perlpath);
Expand All @@ -18,6 +18,6 @@ my $interpreter = do {
local $SIG{__WARN__} = sub { fail("Got a warning during find_perl_interpreter") }; local $SIG{__WARN__} = sub { fail("Got a warning during find_perl_interpreter") };
find_perl_interpreter(); find_perl_interpreter();
}; };
is($interpreter, $perlpath, 'Always find $Config{perlpath} under tainting'); like($interpreter, qr/\Q$perlpath/, 'Always find $Config{perlpath} under tainting');


done_testing; done_testing;

0 comments on commit 4fd0db4

Please sign in to comment.