5 use Support::Templates;
10 use Template::Provider;
11 use Test::More tests => ( scalar(@referenced_files));
13 my $template_path = 'templates/webpages/';
15 my $provider = Template::Provider->new({
20 PLUGIN_BASE => 'SL::Template::Plugin',
21 INCLUDE_PATH => '.:' . $template_path,
24 foreach my $ref (@Support::Templates::referenced_files) {
25 my $file = "${template_path}${ref}.html";
26 my ($result, $not_ok) = $provider->fetch($file);
29 ok(1, "${file} does not contain errors");
31 } elsif (ref($result) eq 'Template::Exception') {
32 print STDERR $result->as_string;
33 ok(0, "${file} contains syntax errors");
36 die "Unknown result type: " . ref($result);