summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorbbaetz%student.usyd.edu.au <>2009-03-01 05:03:11 +0100
committerbbaetz%student.usyd.edu.au <>2009-03-01 05:03:11 +0100
commitd21b063bed4a17d9c12fea2f8eae8542397aeb32 (patch)
tree13eba8c3e56c4142ea1957308d709d216c7ec934 /t
parent788a709dd4cbe325e949cc15a8ceaab3a2930a75 (diff)
downloadbugzilla-d21b063bed4a17d9c12fea2f8eae8542397aeb32.tar.gz
bugzilla-d21b063bed4a17d9c12fea2f8eae8542397aeb32.tar.xz
Bug 135543 - @Support::Templates::testitems does not list all templates
Patch by ddkilzer@theracingworld.com (David D. Kilzer), r=gerv, justdave
Diffstat (limited to 't')
-rw-r--r--t/005whitespace.t27
1 files changed, 15 insertions, 12 deletions
diff --git a/t/005whitespace.t b/t/005whitespace.t
index a3c9fed3a..eaf1ef241 100644
--- a/t/005whitespace.t
+++ b/t/005whitespace.t
@@ -18,34 +18,37 @@
# Rights Reserved.
#
# Contributor(s): Jacob Steenhagen <jake@acutex.net>
+# David D. Kilzer <ddkilzer@kilzer.net>
#
#################
#Bugzilla Test 5#
#####no_tabs#####
-BEGIN { use lib "t/"; }
-BEGIN { use Support::Files; }
-BEGIN { use Support::Templates; }
-BEGIN { $tests = @Support::Files::testitems; }
-BEGIN { $tests += @Support::Templates::testitems; }
-BEGIN { use Test::More tests => $tests; }
-
+use diagnostics;
use strict;
+use lib 't';
+
+use Support::Files;
+use Support::Templates;
+
+use File::Spec 0.82;
+use Test::More tests => ( scalar(@Support::Files::testitems)
+ + scalar(@Support::Templates::actual_files));
+
my @testitems = @Support::Files::testitems;
-my @templates = map($Support::Templates::include_path . "/" . $_,
- @Support::Templates::testitems);
+my @templates = map(File::Spec->catfile($Support::Templates::include_path, $_),
+ @Support::Templates::actual_files);
push(@testitems, @templates);
foreach my $file (@testitems) {
open (FILE, "$file");
- my @file = <FILE>;
- close (FILE);
- if (grep /\t/, @file) {
+ if (grep /\t/, <FILE>) {
ok(0, "$file contains tabs --WARNING");
} else {
ok(1, "$file has no tabs");
}
+ close (FILE);
}