Summary: | Add unit tests for xgettext.pl | ||
---|---|---|---|
Product: | Koha | Reporter: | Julian Maurice <julian.maurice> |
Component: | Test Suite | Assignee: | Julian Maurice <julian.maurice> |
Status: | Passed QA --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | jonathan.druart, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Bug Depends on: | 39115 | ||
Bug Blocks: | |||
Attachments: |
Bug 39130: Add unit tests for xgettext.pl
Bug 39130: Add unit tests for xgettext.pl Bug 39130: (QA follow-up): Ignore useful untidy part of sample.tt Bug 39130: Add unit tests for xgettext.pl Bug 39130: (QA follow-up): Ignore useful untidy part of sample.tt Bug 39130: Add unit tests for xgettext.pl Bug 39130: (QA follow-up): Ignore useful untidy part of sample.tt |
Description
Julian Maurice
2025-02-13 13:26:31 UTC
Created attachment 178008 [details] [review] Bug 39130: Add unit tests for xgettext.pl Test plan: 1. Run `prove t/db_dependent/misc/translator/xgettext.pl.t` Created attachment 178009 [details] [review] Bug 39130: Add unit tests for xgettext.pl Test plan: 1. Run `prove t/db_dependent/misc/translator/xgettext.pl.t` QA script still failing (only 2. is valid) 1. FAIL t/db_dependent/misc/translator/sample-not-working.tt FAIL valid_template parse error - /kohadevbox/koha/t/db_dependent/misc/translator/sample-not-working.tt line 2: unexpected end of input We could exclude it from the QA script. Or just ignore this time: it does not fail xt/author/valid-templates.t (which does the same test but only process template file from koha-tmpl) 2. FAIL t/db_dependent/misc/translator/sample.tt FAIL tidiness File is not tidy, please run `perl misc/devel/tidy.pl t/db_dependent/misc/translator/sample.tt` This one is problematic as the tidy version remove the space: -<span [% IF show_title %] title="but this is (thanks to space before attribute name)"[% END %]></span> +<span [% IF show_title %]title="but this is (thanks to space before attribute name)"[% END %]></span> So we should not have such occurrences (unless prettier-ignore is used). 3. We are ignoring tt_valid for now FAIL tt_valid lines 42, 44, 45 (In reply to Jonathan Druart from comment #3) > 2. > FAIL t/db_dependent/misc/translator/sample.tt > FAIL tidiness > File is not tidy, please run `perl misc/devel/tidy.pl > t/db_dependent/misc/translator/sample.tt` > > This one is problematic as the tidy version remove the space: > -<span [% IF show_title %] title="but this is (thanks to space before > attribute name)"[% END %]></span> > +<span [% IF show_title %]title="but this is (thanks to space before > attribute name)"[% END %]></span> > > So we should not have such occurrences (unless prettier-ignore is used). I'd like to keep the space, as a way of documenting xgettext.pl behavior. Can we make the QA script ignore the .tt files in t/ ? (In reply to Julian Maurice from comment #4) > (In reply to Jonathan Druart from comment #3) > > 2. > > FAIL t/db_dependent/misc/translator/sample.tt > > FAIL tidiness > > File is not tidy, please run `perl misc/devel/tidy.pl > > t/db_dependent/misc/translator/sample.tt` > > > > This one is problematic as the tidy version remove the space: > > -<span [% IF show_title %] title="but this is (thanks to space before > > attribute name)"[% END %]></span> > > +<span [% IF show_title %]title="but this is (thanks to space before > > attribute name)"[% END %]></span> > > > > So we should not have such occurrences (unless prettier-ignore is used). > I'd like to keep the space, as a way of documenting xgettext.pl behavior. > Can we make the QA script ignore the .tt files in t/ ? I believe we can - we already made it ignore other places. Have a look here maybe: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39115 Created attachment 178153 [details] [review] Bug 39130: (QA follow-up): Ignore useful untidy part of sample.tt And fix a minor legit tidy issue above. (In reply to Julian Maurice from comment #4) > I'd like to keep the space, as a way of documenting xgettext.pl behavior. > Can we make the QA script ignore the .tt files in t/ ? Is the above follow-up ok? It silences point 2. of comment 3 (In reply to Victor Grousset/tuxayo from comment #7) > Is the above follow-up ok? > It silences point 2. of comment 3 Perfect! Thanks Victor Created attachment 178380 [details] [review] Bug 39130: Add unit tests for xgettext.pl Test plan: 1. Run `prove t/db_dependent/misc/translator/xgettext.pl.t` Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Created attachment 178381 [details] [review] Bug 39130: (QA follow-up): Ignore useful untidy part of sample.tt And fix a minor legit tidy issue above. Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> It works! :) Created attachment 179110 [details] [review] Bug 39130: Add unit tests for xgettext.pl Test plan: 1. Run `prove t/db_dependent/misc/translator/xgettext.pl.t` Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 179111 [details] [review] Bug 39130: (QA follow-up): Ignore useful untidy part of sample.tt And fix a minor legit tidy issue above. Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> @RM: you can ignore the QA failures. |