summaryrefslogtreecommitdiffstats
path: root/t/Support/Templates.pm
diff options
context:
space:
mode:
Diffstat (limited to 't/Support/Templates.pm')
-rw-r--r--t/Support/Templates.pm17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/Support/Templates.pm b/t/Support/Templates.pm
index 360fdc4cc..8ae392681 100644
--- a/t/Support/Templates.pm
+++ b/t/Support/Templates.pm
@@ -22,6 +22,8 @@
package Support::Templates;
+$include_path = "template/default";
+
# Scan Bugzilla's code looking for templates used and put them
# in the @testitems array to be used by the template.t test.
@@ -41,4 +43,19 @@ foreach my $file (@files) {
}
}
+# Now let's look at the templates and find any other templates
+# that are INCLUDEd.
+foreach my $file(@testitems) {
+ open (FILE, $include_path . "/" . $file) || next;
+ my @lines = <FILE>;
+ close (FILE);
+ foreach my $line (@lines) {
+ if ($line =~ m/\[% INCLUDE (.+?) /) {
+ my $template = $1;
+ push (@testitems, $template) unless $t{$template};
+ $t{$template} = 1;
+ }
+ }
+}
+
1;