Various uninitialized warnings spew out when proving. Clean up output while maintaining test integrity.
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!