This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Test for +x bits for all the files in exec-bit.txt
authorFlorian Ragwitz <rafl@debian.org>
Thu, 19 Aug 2010 21:23:29 +0000 (23:23 +0200)
committerFlorian Ragwitz <rafl@debian.org>
Thu, 19 Aug 2010 21:25:37 +0000 (23:25 +0200)
The globbing only works when done in the right directory.

t/porting/exec-bit.t

index 68edf83..482654a 100644 (file)
@@ -20,9 +20,9 @@ use File::Spec::Functions;
 
 # Copied from Porting/makerel - these will get +x in the tarball
 # XXX refactor? -- dagolden, 2010-07-23
-my %exe_list = 
+my %exe_list =
   map   { $_ => 1 }
-  map   { my ($f) = split; glob($f) } 
+  map   { my ($f) = split; glob("../$f") }
   grep  { $_ !~ /\A#/ && $_ !~ /\A\s*\z/ }
   map   { split "\n" }
   do    { local (@ARGV, $/) = '../Porting/exec-bit.txt'; <> };
@@ -32,8 +32,8 @@ $ExtUtils::Manifest::Quiet = 1;
 my @manifest = sort keys %{ maniread("../MANIFEST") };
 
 # Check that +x files in repo get +x from makerel
-for my $f ( @manifest ) {
-  next unless -x "../$f";
+for my $f ( map { "../$_" } @manifest ) {
+  next unless -x $f;
 
   ok( $exe_list{$f}, "tarball will chmod +x $f" )
     or diag( "Remove the exec bit or add '$f' to Porting/exec-bit.txt" );