Bug 16174: Warning in tt_valid.t due to bug 15527
authorTomas Cohen Arazi <tomascohen@unc.edu.ar>
Wed, 30 Mar 2016 18:15:02 +0000 (15:15 -0300)
committerBrendan A Gallagher <brendan@bywatersolutions.com>
Fri, 1 Apr 2016 19:11:32 +0000 (19:11 +0000)
Bug 15527 introduced a new directory (xslt) on the top level OPAC templates
directory. The tt_valid.t script should include that top level dir on the list
of excluded dirs so it doesn't look for themes there.

To test:
- Run
  $ prove xt/tt_valid.t
=> FAIL: You get the following warning:
Can't stat koha-tmpl/opac-tmpl/xslt/en: No such file or directory
 at xt/tt_valid.t line 8
- Apply the patch
- Run
  $ prove xt/tt_valid.t
=> SUCCESS: Tests pass and don't raise warnings.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>

xt/tt_valid.t

index 4e5174b..7285019 100755 (executable)
@@ -28,7 +28,7 @@ my @themes;
 # OPAC themes
 my $opac_dir  = 'koha-tmpl/opac-tmpl';
 opendir ( my $dh, $opac_dir ) or die "can't opendir $opac_dir: $!";
-for my $theme ( grep { not /^\.|lib|js/ } readdir($dh) ) {
+for my $theme ( grep { not /^\.|lib|js|xslt/ } readdir($dh) ) {
     push @themes, "$opac_dir/$theme/en";
 }
 close $dh;