summaryrefslogtreecommitdiffstats
path: root/t/004template.t
diff options
context:
space:
mode:
authorjake%acutex.net <>2001-10-07 06:37:20 +0200
committerjake%acutex.net <>2001-10-07 06:37:20 +0200
commit934948d1e59b99f23083e73c17344806cd25084b (patch)
treef473c8c330f3fd286c6b210aa7dff502cb1d4f60 /t/004template.t
parent1c921c81914e23bd762921575d3903d19f8072bc (diff)
downloadbugzilla-934948d1e59b99f23083e73c17344806cd25084b.tar.gz
bugzilla-934948d1e59b99f23083e73c17344806cd25084b.tar.xz
We also need to look for templates that are INCLUDEd in other templates.
No review needed for tests at this time. NOT PART OF BUILD
Diffstat (limited to 't/004template.t')
-rw-r--r--t/004template.t9
1 files changed, 5 insertions, 4 deletions
diff --git a/t/004template.t b/t/004template.t
index 7077a6f17..ce36683fc 100644
--- a/t/004template.t
+++ b/t/004template.t
@@ -32,13 +32,14 @@ BEGIN { use Test::More tests => $tests; }
use Template;
my @testitems = @Support::Templates::testitems;
+my $include_path = $Support::Templates::include_path;
my $verbose = $::ENV{VERBOSE};
# Check to make sure all templates that are referenced in
# Bugzilla exist in the proper place.
-my $path = "template/default";
+
foreach my $file(@testitems) {
- if (-e $path . "/" . $file) {
+ if (-e $include_path . "/" . $file) {
ok(1, "$file exists");
} else {
ok(0, "$file does not exist");
@@ -47,7 +48,7 @@ foreach my $file(@testitems) {
# Processes all the templates to make sure they have good syntax
my $template = Template->new ({
- INCLUDE_PATH => $path,
+ INCLUDE_PATH => $include_path,
RELATIVE => 1
});
@@ -55,7 +56,7 @@ open SAVEOUT, ">&STDOUT"; # stash the original output stream
open STDOUT, "> /dev/null"; # discard all output
foreach my $file(@testitems) {
if ($template->process($file)) {
- ok(1, "$file");
+ ok(1, "$file syntax ok");
} else {
ok(0, "$file has bad syntax");
}