5 use File::Glob 'bsd_glob';
7 use DBICTest ':GlobalLock';
9 local $TODO = 'Temporarily todo-ed for dq2eb';
12 unless ( DBIx::Class::Optional::Dependencies->req_ok_for ('test_whitespace') ) {
13 my $missing = DBIx::Class::Optional::Dependencies->req_missing_for ('test_whitespace');
15 ? die ("Failed to load release-testing module requirements: $missing")
16 : plan skip_all => "Test needs: $missing"
19 # FIXME - temporary workaround for RT#82032, RT#82033
20 # also add all scripts (no extension) and some extra extensions
23 no warnings 'redefine';
25 $_[0] !~ /\./ || $_[0] =~ /\.(?:pm|pod|skip|bash|sql|json|proto)$/i || $_[0] =~ /::/;
28 *Test::EOL::_is_perl_module = $is_pm;
29 *Test::NoTabs::_is_perl_module = $is_pm;
32 my @pl_targets = qw/t xt lib script examples maint/;
33 Test::EOL::all_perl_files_ok({ trailing_whitespace => 1 }, @pl_targets);
34 Test::NoTabs::all_perl_files_ok(@pl_targets);
36 # check some non-"perl files" in the root separately
37 # use .gitignore as a guide of what to skip
38 # (or do not test at all if no .gitignore is found)
39 if (open(my $gi, '<', '.gitignore')) {
41 while (my $ln = <$gi>) {
42 next if $ln =~ /^\s*$/;
44 $skipnames->{$_}++ for bsd_glob($ln);
47 # that we want to check anyway
48 delete $skipnames->{'META.yml'};
50 for my $fn (bsd_glob('*')) {
51 next if $skipnames->{$fn};
53 Test::EOL::eol_unix_ok($fn, { trailing_whitespace => 1 });
54 Test::NoTabs::notabs_ok($fn);
58 # FIXME - Test::NoTabs and Test::EOL declare 'no_plan' which conflicts with done_testing
59 # https://github.com/schwern/test-more/issues/14