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,
22 COMPILE_DIR => 'users/templates-cache-for-tests',
25 foreach my $ref (@Support::Templates::referenced_files) {
26 my $file = "${template_path}${ref}.html";
27 my ($result, $not_ok) = $provider->fetch($file);
30 ok(1, "${file} does not contain errors");
32 } elsif (ref($result) eq 'Template::Exception') {
33 print STDERR $result->as_string;
34 ok(0, "${file} contains syntax errors");
37 die "Unknown result type: " . ref($result);