Bugzilla – Attachment 151268 Details for
Bug 33743
xt/find-missing-filters.t parsing files outside of git repo
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33743: Make xt/find-missing-filters.t check directories in git index only
Bug-33743-Make-xtfind-missing-filterst-check-direc.patch (text/plain), 1.97 KB, created by
Jonathan Druart
on 2023-05-16 10:53:02 UTC
(
hide
)
Description:
Bug 33743: Make xt/find-missing-filters.t check directories in git index only
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-05-16 10:53:02 UTC
Size:
1.97 KB
patch
obsolete
>From 86b37acc59d5652a3e01066bd441e19f15a18b4a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 16 May 2023 12:52:22 +0200 >Subject: [PATCH] Bug 33743: Make xt/find-missing-filters.t check directories > in git index only > >--- > xt/find-missing-filters.t | 36 ++++++++++-------------------------- > 1 file changed, 10 insertions(+), 26 deletions(-) > >diff --git a/xt/find-missing-filters.t b/xt/find-missing-filters.t >index 6b7e80f4aa3..f117e9398a2 100755 >--- a/xt/find-missing-filters.t >+++ b/xt/find-missing-filters.t >@@ -17,40 +17,24 @@ > > use Modern::Perl; > use Test::More tests => 1; >-use File::Find; >-use File::Slurp; >+use File::Spec; >+use File::Slurp qw( read_file ); > use Data::Dumper; > use t::lib::QA::TemplateFilters; > >-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|xslt/ } readdir($dh) ) { >- push @themes, "$opac_dir/$theme/en"; >-} >-close $dh; >- >-# STAFF themes >-my $staff_dir = 'koha-tmpl/intranet-tmpl'; >-opendir ( $dh, $staff_dir ) or die "can't opendir $staff_dir: $!"; >-for my $theme ( grep { not /^\.|lib|js/ } readdir($dh) ) { >- push @themes, "$staff_dir/$theme/en"; >-} >-close $dh; >- > my @files; >-sub wanted { >- my $name = $File::Find::name; >- push @files, $name >- if $name =~ m[\.(tt|inc)$] and -f $name; >-} > >-find({ wanted => \&wanted, no_chdir => 1 }, @themes ); >+# OPAC >+push @files, `git ls-files 'koha-tmpl/opac-tmpl/bootstrap/en/*.tt'`; >+push @files, `git ls-files 'koha-tmpl/opac-tmpl/bootstrap/en/*.inc'`; >+ >+# Staff >+push @files, `git ls-files 'koha-tmpl/intranet-tmpl/prog/en/*.tt'`; >+push @files, `git ls-files 'koha-tmpl/intranet-tmpl/prog/en/*.inc'`; > > my @errors; > for my $file ( @files ) { >+ chomp $file; > my $content = read_file($file); > my @e = t::lib::QA::TemplateFilters::missing_filters($content); > push @errors, { file => $file, errors => \@e } if @e; >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33743
:
151268
|
151269