Bugzilla – Attachment 176443 Details for
Bug 38872
Only first 'a' node tested for wrong filters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38872: Add a test
Bug-38872-Add-a-test.patch (text/plain), 1.45 KB, created by
Jonathan Druart
on 2025-01-13 13:48:41 UTC
(
hide
)
Description:
Bug 38872: Add a test
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2025-01-13 13:48:41 UTC
Size:
1.45 KB
patch
obsolete
>From f81a9e6d3d0975bbe0f63fcafee20b76cc391fa4 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 13 Jan 2025 14:42:23 +0100 >Subject: [PATCH] Bug 38872: Add a test > >--- > t/template_filters.t | 19 ++++++++++++++++++- > 1 file changed, 18 insertions(+), 1 deletion(-) > >diff --git a/t/template_filters.t b/t/template_filters.t >index ffc86843e8a..0a24be69822 100755 >--- a/t/template_filters.t >+++ b/t/template_filters.t >@@ -198,7 +198,7 @@ EXPECTED > }; > > subtest 'Use uri filter if needed' => sub { >- plan tests => 4; >+ plan tests => 5; > my $input = <<INPUT; > <a href="tel:[% patron.phone %]">[% patron.phone %]</a> > <a href="mailto:[% patron.emailpro %]" title="[% patron.emailpro %]">[% patron.emailpro %]</a> >@@ -248,6 +248,23 @@ INPUT > ], > ); > >+ $input = <<INPUT; >+<a href="[% good_filter | uri %]">[% var | html %]</a><a href="[% wrong_filter | html %]">[% var | html %]</a> >+INPUT >+ @missing_filters = t::lib::QA::TemplateFilters::missing_filters($input); >+ is_deeply( >+ \@missing_filters, >+ [ >+ { >+ error => "wrong_html_filter", >+ line => >+ '<a href="[% good_filter | uri %]">[% var | html %]</a><a href="[% wrong_filter | html %]">[% var | html %]</a>', >+ line_number => 1 >+ } >+ >+ ], >+ ); >+ > $input = <<INPUT; > <a href="[% good_raw_filter | \$raw %]">[% var | html %]</a> > INPUT >-- >2.34.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 38872
:
176443
|
176444
|
176445
|
176446
|
176447
|
176448
|
176472
|
176473
|
176474
|
176778
|
176779
|
176780