summaryrefslogtreecommitdiff
path: root/cpan/ExtUtils-MakeMaker/t/fixin.t
diff options
context:
space:
mode:
Diffstat (limited to 'cpan/ExtUtils-MakeMaker/t/fixin.t')
-rw-r--r--cpan/ExtUtils-MakeMaker/t/fixin.t34
1 files changed, 33 insertions, 1 deletions
diff --git a/cpan/ExtUtils-MakeMaker/t/fixin.t b/cpan/ExtUtils-MakeMaker/t/fixin.t
index 061e456247..6c6ada5619 100644
--- a/cpan/ExtUtils-MakeMaker/t/fixin.t
+++ b/cpan/ExtUtils-MakeMaker/t/fixin.t
@@ -9,7 +9,7 @@ BEGIN {
use File::Spec;
-use Test::More tests => 22;
+use Test::More tests => 30;
use Config;
use TieOut;
@@ -123,3 +123,35 @@ END
}
);
}
+
+SKIP: {
+ eval { chmod(0755, "usrbin/interp") }
+ or skip "no chmod", 8;
+ skip "Not relevant on VMS or MSWin32", 8 if $^O eq 'VMS' || $^O eq 'MSWin32';
+
+ my $dir = getcwd();
+ local $ENV{PATH} = join $Config{path_sep}, map "$dir/$_", qw(usrbin bin);
+
+ test_fixin(<<END,
+#!$dir/bin/interp
+
+blah blah blah
+END
+ sub {
+ is $_[0], "#!$dir/usrbin/interp\n", 'interpreter updated to one found in PATH';
+ }
+ );
+
+ eval { symlink("../usrbin/interp", "bin/interp") }
+ or skip "no symlinks", 4;
+
+ test_fixin(<<END,
+#!$dir/bin/interp
+
+blah blah blah
+END
+ sub {
+ is $_[0], "#!$dir/bin/interp\n", 'symlinked interpreter later in PATH not mangled';
+ }
+ );
+}