diff options
author | gerv%gerv.net <> | 2002-10-29 18:09:30 +0100 |
---|---|---|
committer | gerv%gerv.net <> | 2002-10-29 18:09:30 +0100 |
commit | 7aede7bc1d9e270e2a1b817fe40750bedf56a270 (patch) | |
tree | 7256164f8fef7ae9c6253956e8af0410a7c8851a /t | |
parent | dad297316ae335ccc20e5d0546525d1c117131c0 (diff) | |
download | bugzilla-7aede7bc1d9e270e2a1b817fe40750bedf56a270.tar.gz bugzilla-7aede7bc1d9e270e2a1b817fe40750bedf56a270.tar.xz |
Bug 168191 - Checksetup needs to force template recompilation. Patch by bbaetz; r=gerv. Should fix tindebox bustage.
Diffstat (limited to 't')
-rw-r--r-- | t/004template.t | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/t/004template.t b/t/004template.t index 02541d351..bbcb9f860 100644 --- a/t/004template.t +++ b/t/004template.t @@ -69,7 +69,7 @@ foreach my $file(@Support::Templates::referenced_files) { } # Processes all the templates to make sure they have good syntax -my $template = Template->new( +my $provider = Template::Provider->new( { INCLUDE_PATH => $include_path , # Need to define filters used in the codebase, they don't @@ -86,29 +86,23 @@ my $template = Template->new( } ); -open SAVEOUT, ">&STDOUT"; # stash the original output stream -open SAVEERR, ">&STDERR"; -open STDOUT, "> /dev/null"; # discard all output -open STDERR, "> /dev/null"; foreach my $file(@Support::Templates::actual_files) { my $path = File::Spec->catfile($include_path, $file); if (-e $path) { - if ($template->process($file)) { + my ($data, $err) = $provider->fetch($file); + + if (!$err) { ok(1, "$file syntax ok"); } else { ok(0, "$file has bad syntax --ERROR"); - print $fh $template->error() . "\n"; + print $fh $data . "\n"; } } else { ok(1, "$path doesn't exist, skipping test"); } } -open STDOUT, ">&SAVEOUT"; # redirect back to original stream -open STDERR, ">&SAVEERR"; -close SAVEOUT; -close SAVEERR; # check to see that all templates have a version string: |