Bugzilla – Attachment 86191 Details for
Bug 22466
TT methods must not be escaped
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22466: Add tests
Bug-22466-Add-tests.patch (text/plain), 1.25 KB, created by
Nick Clemens (kidclamp)
on 2019-03-06 15:55:07 UTC
(
hide
)
Description:
Bug 22466: Add tests
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2019-03-06 15:55:07 UTC
Size:
1.25 KB
patch
obsolete
>From 04dacdd4fbb73a7d11142a95ae68be86fcc404e9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 6 Mar 2019 11:59:35 -0300 >Subject: [PATCH] Bug 22466: Add tests > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > 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 fb30229eef..b479faa292 100644 >--- a/t/template_filters.t >+++ b/t/template_filters.t >@@ -16,7 +16,7 @@ > # along with Koha; if not, see <http://www.gnu.org/licenses>. > > use Modern::Perl; >-use Test::More tests => 6; >+use Test::More tests => 7; > use t::lib::QA::TemplateFilters; > > subtest 'Asset must use raw' => sub { >@@ -301,5 +301,22 @@ EXPECTED > } > ] > ); >+}; > >+subtest 'Do not escape TT methods' => sub { >+ plan tests => 2; >+ my $input = <<INPUT; >+[% my_array.push(a_var) %] >+INPUT >+ >+ my $expected = <<EXPECTED; >+[% my_array.push(a_var) %] >+EXPECTED >+ >+ my $new_content = t::lib::QA::TemplateFilters::fix_filters($input); >+ is( $new_content . "\n", $expected, ); >+ >+ >+ my @missing_filters = t::lib::QA::TemplateFilters::missing_filters($input); >+ is_deeply(\@missing_filters, []); > }; >-- >2.11.0
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 22466
:
86185
|
86186
|
86187
|
86191
|
86192
|
86193
|
86194
|
86195
|
86196