+BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
use DBIx::Class::Optional::Dependencies -skip_all_without => 'test_whitespace';
use warnings;
use Test::More;
use File::Glob 'bsd_glob';
-use lib 't/lib';
+
use DBICTest ':GlobalLock';
# FIXME - temporary workaround for RT#82032, RT#82033
Test::NoTabs::all_perl_files_ok(@pl_targets);
# check some non-"perl files" in the root separately
-# use .gitignore as a guide of what to skip
-# (or do not test at all if no .gitignore is found)
+my @root_files = grep { -f $_ } bsd_glob('*');
+
+# use .gitignore as a partial guide of what to skip
if (open(my $gi, '<', '.gitignore')) {
my $skipnames;
while (my $ln = <$gi>) {
$skipnames->{$_}++ for bsd_glob($ln);
}
- # that we want to check anyway
- delete $skipnames->{'META.yml'};
+ # these we want to check no matter what the above says
+ delete $skipnames->{qw(
+ Changes
+ LICENSE
+ AUTHORS
+ README
+ MANIFEST
+ META.yml
+ META.json
+ )};
+
+ @root_files = grep { ! $skipnames->{$_} } @root_files;
+}
- for my $fn (bsd_glob('*')) {
- next if $skipnames->{$fn};
- next unless -f $fn;
- Test::EOL::eol_unix_ok($fn, { trailing_whitespace => 1 });
- Test::NoTabs::notabs_ok($fn);
- }
+for my $fn (@root_files) {
+ Test::EOL::eol_unix_ok($fn, { trailing_whitespace => 1 });
+ Test::NoTabs::notabs_ok($fn) unless $fn eq 'MANIFEST'; # it is always tab infested
}
# FIXME - Test::NoTabs and Test::EOL declare 'no_plan' which conflicts with done_testing