| Summary: | Silence warnings t/Label* | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Mark Tompsett <mtompset> |
| Component: | Test Suite | Assignee: | Mark Tompsett <mtompset> |
| Status: | CLOSED FIXED | QA Contact: | Galen Charlton <gmcharlt> |
| Severity: | minor | ||
| Priority: | P5 - low | CC: | bgkriegel, tomascohen |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
| Bug Depends on: | |||
| Bug Blocks: | 8879 | ||
| Attachments: |
Bug 14115: Silence warnings in t/Label*
[SIGNED-OFF] Bug 14115: Silence warnings in t/Label* Bug 14115: Silence warnings in t/Label* Bug 14115: Silence warnings in t/Label* [PASSED QA] Bug 14115: Silence warnings in t/Label* |
||
|
Description
Mark Tompsett
2015-05-01 21:55:24 UTC
Created attachment 38756 [details] [review] Bug 14115: Silence warnings in t/Label* Two functions were triggering noisy warnings while testing: _get_text_fields and _split_lccn. TEST PLAN ---------- 1) $ prove t/Label* -- several warnings 2) apply patch 3) $ prove t/Label* -- no warnings 4) koha qa test tools. Created attachment 38907 [details] [review] [SIGNED-OFF] Bug 14115: Silence warnings in t/Label* Two functions were triggering noisy warnings while testing: _get_text_fields and _split_lccn. TEST PLAN ---------- 1) $ prove t/Label* -- several warnings 2) apply patch 3) $ prove t/Label* -- no warnings 4) koha qa test tools. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Nicer, no koha-qa errors Comment on attachment 38907 [details] [review] [SIGNED-OFF] Bug 14115: Silence warnings in t/Label* Review of attachment 38907 [details] [review]: ----------------------------------------------------------------- ::: C4/Labels/Label.pm @@ +115,5 @@ > my $csv = Text::CSV_XS->new({allow_whitespace => 1}); > my $status = $csv->parse($format_string); > my @sorted_fields = map {{ 'code' => $_, desc => $_ }} > + map { $_ && $_ eq 'callnumber' ? > + 'itemcallnumber' : $_ } # see bug 5653 I am not against cutting lines, but this should be done to improve the readability. Here you didn't, there are 2 map, and 1 is cut after a ? Perltidy suggests me: 117 my @sorted_fields = map { { 'code' => $_, desc => $_ } } 118 map { $_ && $_ eq 'callnumber' ? 'itemcallnumber' : $_ } # see bug 5653 119 $csv->fields(); Created attachment 39432 [details] [review] Bug 14115: Silence warnings in t/Label* Two functions were triggering noisy warnings while testing: _get_text_fields and _split_lccn. TEST PLAN ---------- 1) $ prove t/Label* -- several warnings 2) apply patch 3) $ prove t/Label* -- no warnings 4) koha qa test tools. Created attachment 39499 [details] [review] Bug 14115: Silence warnings in t/Label* Two functions were triggering noisy warnings while testing: _get_text_fields and _split_lccn. TEST PLAN ---------- 1) $ prove t/Label* -- several warnings 2) apply patch 3) $ prove t/Label* -- no warnings 4) koha qa test tools. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Nicer, no koha-qa errors Signed-off-by: Aleisha <aleishaamohia@hotmail.com> Created attachment 39692 [details] [review] [PASSED QA] Bug 14115: Silence warnings in t/Label* Two functions were triggering noisy warnings while testing: _get_text_fields and _split_lccn. TEST PLAN ---------- 1) $ prove t/Label* -- several warnings 2) apply patch 3) $ prove t/Label* -- no warnings 4) koha qa test tools. Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Nicer, no koha-qa errors Signed-off-by: Aleisha <aleishaamohia@hotmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Patch pushed to master. Thanks Mark! |