Bug 20538: Prevent warnings in xt/author/valid-templates.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Julian Maurice 2018-04-25 09:21:30 +02:00 committed by Jonathan Druart
parent 896644d901
commit e05cd22723
1 changed files with 5 additions and 1 deletions

View File

@ -117,6 +117,10 @@ sub run_template_test {
sub create_template_test {
my $includes = shift;
my @exclusions = @_;
my $interface = $includes =~ s|^.*/([^/]*-tmpl).*$|$1|r;
my $theme = ($interface =~ /opac/) ? 'bootstrap' : 'prog';
return sub {
my $tt = Template->new(
{
@ -131,7 +135,7 @@ sub create_template_test {
return;
}
}
my $vars;
my $vars = { interface => $interface, theme => $theme };
my $output;
if ( ! -d $_ ) { # skip dirs
if ( !ok( $tt->process( $_, $vars, \$output ), $_ ) ) {