1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
#!/usr/bin/perl
use Test::More;
use strict;
use warnings;
no warnings 'syntax';
unless ($ENV {AUTHOR_TESTING}) {
plan skip_all => "AUTHOR tests";
exit;
}
sub version;
SKIP: {
open my $fh, "<", "MANIFEST" or do {
skip "Failed to open MANIFEST", 1;
};
while (<$fh>) {
chomp;
s/\s+Module.*//;
unless (-e) {
fail "$_ does not exist";
next;
}
SKIP: {
my $mode = (stat) [2];
skip "Failed to grab permissions of $_", 1 unless $mode;
my $perm = $mode & 07777;
is $perm, /\.t/ ? 0755 : 0644, "Permissions of $_"
}
}
}
done_testing;
__END__
|