Skip to content

Commit 29ba6e0

Browse files
committed
Added test for relocatable fixin
1 parent ae8f333 commit 29ba6e0

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

t/fixin.t

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ BEGIN {
1212

1313
use File::Spec;
1414

15-
use Test::More tests => 25;
15+
use Test::More tests => 28;
1616

1717
use Config;
1818
use TieOut;
@@ -125,6 +125,21 @@ END
125125
);
126126
}
127127

128+
SKIP: {
129+
skip "Not relevant on VMS or MSWin32", 6 if $^O eq 'VMS' || $^O eq 'MSWin32' || $^O eq 'cygwin';
130+
local $ENV{PERL_MM_SHEBANG}='relocatable';
131+
test_fixin(<<END,
132+
#!/usr/bin/env perl
133+
134+
foo doo who doo
135+
END
136+
sub {
137+
my @lines = @_;
138+
like $lines[0], qr[^#!/usr/bin/env perl\s$], "Relocatable perl";
139+
}
140+
);
141+
}
142+
128143
SKIP: {
129144
eval { chmod(0755, "usrbin/interp") }
130145
or skip "no chmod", 6;

0 commit comments

Comments
 (0)