[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
Sat Apr 12 18:04:43 CEST 2014


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

Katrin Fischer <katrin.fischer at bsz-bw.de> changed:

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

--- Comment #5 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
Created attachment 27053
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=27053&action=edit
[PASSED QA] 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.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83 at web.de>
Works as described, passes all tests and QA script.

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


More information about the Koha-bugs mailing list