summaryrefslogtreecommitdiffstats
path: root/t/Support/Files.pm
diff options
context:
space:
mode:
Diffstat (limited to 't/Support/Files.pm')
-rw-r--r--t/Support/Files.pm60
1 files changed, 31 insertions, 29 deletions
diff --git a/t/Support/Files.pm b/t/Support/Files.pm
index 603d95cf9..7142b11b9 100644
--- a/t/Support/Files.pm
+++ b/t/Support/Files.pm
@@ -17,56 +17,58 @@ use File::Find;
our @additional_files = ();
use constant IGNORE => qw(
- Bugzilla/DuoAPI.pm
- Bugzilla/DuoWeb.pm
+ Bugzilla/DuoAPI.pm
+ Bugzilla/DuoWeb.pm
);
our @files = glob('*');
-find(sub { push(@files, $File::Find::name) if $_ =~ /\.pm$/;}, qw(Bugzilla docs));
+find(sub { push(@files, $File::Find::name) if $_ =~ /\.pm$/; },
+ qw(Bugzilla docs));
push(@files, 'extensions/create.pl', 'docs/makedocs.pl', 'cpanfile');
-our @extensions =
- grep { $_ ne 'extensions/create.pl' && ! -e "$_/disabled" }
- glob('extensions/*');
+our @extensions = grep { $_ ne 'extensions/create.pl' && !-e "$_/disabled" }
+ glob('extensions/*');
foreach my $extension (@extensions) {
- find(sub { push(@files, $File::Find::name) if $_ =~ /\.pm$|\.pl$/;}, $extension);
+ find(sub { push(@files, $File::Find::name) if $_ =~ /\.pm$|\.pl$/; },
+ $extension);
}
our @test_files = glob('t/*.t xt/*/*.t');
foreach my $extension (@extensions) {
- # Skip disabled extensions
- next if -e "$extension/disabled";
- find(sub { push(@files, $File::Find::name) if $_ =~ /\.pm$/;}, $extension);
+ # Skip disabled extensions
+ next if -e "$extension/disabled";
+
+ find(sub { push(@files, $File::Find::name) if $_ =~ /\.pm$/; }, $extension);
}
sub isTestingFile {
- my ($file) = @_;
- my $exclude;
-
- foreach my $ignore (IGNORE) {
- return undef if $ignore eq $file;
- }
-
- if ($file =~ /\.psgi$|\.cgi$|\.pl$|\.pm$/) {
- return 1;
- }
- my $additional;
- foreach $additional (@additional_files) {
- if ($file eq $additional) { return 1; }
- }
- return undef;
+ my ($file) = @_;
+ my $exclude;
+
+ foreach my $ignore (IGNORE) {
+ return undef if $ignore eq $file;
+ }
+
+ if ($file =~ /\.psgi$|\.cgi$|\.pl$|\.pm$/) {
+ return 1;
+ }
+ my $additional;
+ foreach $additional (@additional_files) {
+ if ($file eq $additional) { return 1; }
+ }
+ return undef;
}
our (@testitems, @module_files);
foreach my $currentfile (@files) {
- if (isTestingFile($currentfile)) {
- push(@testitems, $currentfile);
- }
- push(@module_files, $currentfile) if $currentfile =~ /\.pm$/;
+ if (isTestingFile($currentfile)) {
+ push(@testitems, $currentfile);
+ }
+ push(@module_files, $currentfile) if $currentfile =~ /\.pm$/;
}
1;