Bug 135543 - @Support::Templates::testitems does not list all templates

Patch by ddkilzer@theracingworld.com (David D. Kilzer), r=gerv, justdave
parent 788a709d
...@@ -18,34 +18,37 @@ ...@@ -18,34 +18,37 @@
# Rights Reserved. # Rights Reserved.
# #
# Contributor(s): Jacob Steenhagen <jake@acutex.net> # Contributor(s): Jacob Steenhagen <jake@acutex.net>
# David D. Kilzer <ddkilzer@kilzer.net>
# #
################# #################
#Bugzilla Test 5# #Bugzilla Test 5#
#####no_tabs##### #####no_tabs#####
BEGIN { use lib "t/"; } use diagnostics;
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 strict; 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 @testitems = @Support::Files::testitems;
my @templates = map($Support::Templates::include_path . "/" . $_, my @templates = map(File::Spec->catfile($Support::Templates::include_path, $_),
@Support::Templates::testitems); @Support::Templates::actual_files);
push(@testitems, @templates); push(@testitems, @templates);
foreach my $file (@testitems) { foreach my $file (@testitems) {
open (FILE, "$file"); open (FILE, "$file");
my @file = <FILE>; if (grep /\t/, <FILE>) {
close (FILE);
if (grep /\t/, @file) {
ok(0, "$file contains tabs --WARNING"); ok(0, "$file contains tabs --WARNING");
} else { } else {
ok(1, "$file has no tabs"); ok(1, "$file has no tabs");
} }
close (FILE);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment