Bugzilla – Attachment 142218 Details for
Bug 31883
Filter trim causes false warnings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31883: t::lib::QA::TemplateFilters missing built-in TT filter "trim" causes false warnings
Bug31883-tlibQATemplateFilters-missing-built-in-TT.patch (text/plain), 2.07 KB, created by
Mason James
on 2022-10-20 00:33:26 UTC
(
hide
)
Description:
Bug 31883: t::lib::QA::TemplateFilters missing built-in TT filter "trim" causes false warnings
Filename:
MIME Type:
Creator:
Mason James
Created:
2022-10-20 00:33:26 UTC
Size:
2.07 KB
patch
obsolete
>From fcfdd133a96a339b3e60cef0364743b9d98fdbe9 Mon Sep 17 00:00:00 2001 >From: Mason James <mtj@kohaaloha.com> >Date: Thu, 20 Oct 2022 13:26:17 +1300 >Subject: [PATCH] =?UTF-8?q?Bug=C2=A031883:=20t::lib::QA::TemplateFilters?= > =?UTF-8?q?=20missing=20built-in=20TT=20filter=20"trim"=20causes=20false?= > =?UTF-8?q?=20warnings?= >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit >Content-Type: text/plain; charset="utf-8" > >to test... > > 1/ checkout latest master > > 2/ prove xt/find-missing-filters.t > xt/find-missing-filters.t .. 1/1 > # Failed test 'Template variables should be correctly escaped' > # at xt/find-missing-filters.t line 59. > # got: '1' > # expected: '0' > # $VAR1 = { > # 'errors' => [ > # { > # 'error' => 'missing_filter', > # 'line' => ' [% messages = INCLUDE \'patron_messages.inc\' moremember = 1 | trim %]', > # 'line_number' => 97 > # } > # ], > # 'file' => 'koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt' > # }; > # Looks like you failed 1 test of 1. > > 3/ apply patch > > 4/ prove xt/find-missing-filters.t > > xt/find-missing-filters.t .. ok > All tests successful. > Files=1, Tests=1, 2 wallclock secs ( 0.03 usr 0.01 sys + 2.15 cusr 0.07 csys = 2.26 CPU) > Result: PASS <<<<<<<<<<<<<<< >--- > t/lib/QA/TemplateFilters.pm | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/t/lib/QA/TemplateFilters.pm b/t/lib/QA/TemplateFilters.pm >index 5df4fd814b..cc8c07bd79 100644 >--- a/t/lib/QA/TemplateFilters.pm >+++ b/t/lib/QA/TemplateFilters.pm >@@ -157,6 +157,9 @@ sub process_tt_block { > # Already has url or uri filter > or $tt_block =~ m{\|\s?ur(l|i)} > >+ # Already has trim filter >+ or $tt_block =~ m{\|\s?trim} >+ > # Specific for [% foo UNLESS bar %] > or $tt_block =~ m{^(?<before>\S+)\s+UNLESS\s+(?<after>\S+)} > ; >-- >2.20.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 31883
:
142218
|
142235
|
142236
|
142237
|
142238