[Bug 39130] New: Add unit tests for xgettext.pl
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39130 Bug ID: 39130 Summary: Add unit tests for xgettext.pl Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Test Suite Assignee: julian.maurice@biblibre.com Reporter: julian.maurice@biblibre.com QA Contact: testopia@bugs.koha-community.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39130 --- Comment #1 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 178008 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178008&action=edit Bug 39130: Add unit tests for xgettext.pl Test plan: 1. Run `prove t/db_dependent/misc/translator/xgettext.pl.t` -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39130 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39130 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |39115 CC| |jonathan.druart@gmail.com Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39115 [Bug 39115] Tidy script should list the files we do not want to tidy -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39130 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #178008|0 |1 is obsolete| | --- Comment #2 from Julian Maurice <julian.maurice@biblibre.com> --- Created attachment 178009 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178009&action=edit Bug 39130: Add unit tests for xgettext.pl Test plan: 1. Run `prove t/db_dependent/misc/translator/xgettext.pl.t` -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39130 --- Comment #3 from Jonathan Druart <jonathan.druart@gmail.com> --- 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39130 --- Comment #4 from Julian Maurice <julian.maurice@biblibre.com> --- (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/ ?
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39130 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39130 --- Comment #6 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 178153 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178153&action=edit Bug 39130: (QA follow-up): Ignore useful untidy part of sample.tt And fix a minor legit tidy issue above. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39130 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net --- Comment #7 from Victor Grousset/tuxayo <victor@tuxayo.net> --- (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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39130 --- Comment #8 from Julian Maurice <julian.maurice@biblibre.com> --- (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
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39130 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #178009|0 |1 is obsolete| | --- Comment #9 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 178380 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178380&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39130 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #178153|0 |1 is obsolete| | --- Comment #10 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 178381 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=178381&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39130 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #11 from Victor Grousset/tuxayo <victor@tuxayo.net> --- It works! :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39130 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39130 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #178380|0 |1 is obsolete| | Attachment #178381|0 |1 is obsolete| | --- Comment #12 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 179110 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=179110&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39130 --- Comment #13 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 179111 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=179111&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39130 --- Comment #14 from Jonathan Druart <jonathan.druart@gmail.com> --- @RM: you can ignore the QA failures. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39130 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |jonathan.druart@gmail.com |y.org | --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Jonathan Druart from comment #14)
@RM: you can ignore the QA failures.
Thanks for the note :) 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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39130 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |25.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39130 --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 25.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39130 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to main |Needs documenting --- Comment #17 from Fridolin Somers <fridolin.somers@biblibre.com> --- Depends on Bug 39115 not in 24.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39130 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Status|Needs documenting |RESOLVED Resolution|--- |FIXED --- Comment #18 from David Nind <david@davidnind.com> --- Test suite changes, no changes to the manual required. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39130 Bug 39130 depends on bug 39115, which changed state. Bug 39115 Summary: Tidy script should list the files we do not want to tidy https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39115 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org