Skip to content

Commit

Permalink
remove the checks on $Config{startperl}
Browse files Browse the repository at this point in the history
  • Loading branch information
rschupp committed Apr 3, 2018
1 parent 06a5219 commit 03fcbc6
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions t/20-pp.t
Expand Up @@ -34,34 +34,21 @@ my $cwd = getcwd();
my $test_dir = catdir($cwd, 'contrib', 'automated_pp_test');

my $parl = catfile($cwd, 'blib', 'script', "parl$Config{_exe}");
my $startperl = $Config{startperl};
$startperl =~ s/^#!//;

my $orig_X = $^X;
my $orig_startperl = $startperl;

if (!-e $parl) {
print "1..0 # Skip 'parl' not found\n";
exit;
}
elsif (!($^X = main->can_run($^X))) {
if (!($^X = main->can_run($^X))) {
print "1..0 # Skip '$orig_X' not found\n";
exit;
}
elsif (!($startperl = main->can_run($startperl))) {
print "1..0 # Skip '$orig_startperl' not found\n";
exit;
}

# NOTE: Win32::GetShortPathName exists on cygwin, too
if ($^O eq 'MSWin32' && defined &Win32::GetShortPathName) {
$^X = lc(Win32::GetShortPathName($^X));
$startperl = lc(Win32::GetShortPathName($startperl));
}

if (!samefiles($startperl, $^X)) {
print "1..0 # Skip '$^X' is not the same as '$startperl'\n";
exit;
}

$ENV{PAR_GLOBAL_CLEAN} = 1;
Expand Down

0 comments on commit 03fcbc6

Please sign in to comment.