[Koha-bugs] [Bug 12076] xt/tt_valid.t can miss an invalid construct

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Apr 11 23:23:19 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12076

Bernardo Gonzalez Kriegel <bgkriegel at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #27041|0                           |1
        is obsolete|                            |

--- Comment #4 from Bernardo Gonzalez Kriegel <bgkriegel at gmail.com> ---
Created attachment 27043
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=27043&action=edit
[SIGNED-OFF] Bug 12076: better detect an untranslatable template construct

Per bug 6458, template constructs of the form

<li [% IF (foo) %]selected="selected"[% END %]...

are forbidden as they can cause problems with translated templates.
However, the tt_valid.t test currently doesn't catch the variation
where '-' is used to suppress extra whitespace:

<li [%- IF (foo) -%]selected="selected"[%- END -%]...

This patch corrects the issue.

To test:

[1] Temporarily add the following line to a template file:

<li [%- IF a -%]a="a"[%- END -%] />

[2] Run prove -v xt/tt_valid.t.  Note that no error is reported.
[3] Apply the patch, and rerun the tt_valid.t test.  This time,
    an error should be reported.

Signed-off-by: Galen Charlton <gmc at esilibrary.com>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel at gmail.com>

Works well, detects the forbidden pattern
No koha-qa errors.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list