From 07c5690c1c62f00964a0d8bc2aaa67cf02933ca7 Mon Sep 17 00:00:00 2001 From: David Cook Date: Tue, 26 Sep 2023 04:58:54 +0000 Subject: [PATCH] Bug 34549: perltidy --- C4/Biblio.pm | 4 ++-- t/db_dependent/Biblio/TransformHtmlToMarc.t | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index e3c90d5244..4039f8f23a 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -2239,7 +2239,7 @@ sub TransformHtmlToMarc { ; # between 001 and 009 (included) } elsif ( $fval ne '' ) { - $fval = StripNonXmlChars($fval); #Strip out any non-XML characters like control characters + $fval = StripNonXmlChars($fval); #Strip out any non-XML characters like control characters $newfield = MARC::Field->new( $tag, $fval, ); } @@ -2261,7 +2261,7 @@ sub TransformHtmlToMarc { $newfield->add_subfields( $fkey => $fval); } elsif($fval ne '') { - $fval = StripNonXmlChars($fval); #Strip out any non-XML characters like control characters + $fval = StripNonXmlChars($fval); #Strip out any non-XML characters like control characters $newfield = MARC::Field->new( $tag, $ind1, $ind2, $fkey => $fval ); } $j += 2; diff --git a/t/db_dependent/Biblio/TransformHtmlToMarc.t b/t/db_dependent/Biblio/TransformHtmlToMarc.t index 2670f29c82..0d54748031 100755 --- a/t/db_dependent/Biblio/TransformHtmlToMarc.t +++ b/t/db_dependent/Biblio/TransformHtmlToMarc.t @@ -76,7 +76,7 @@ subtest 'Biblio record' => sub { # A field (900) after 490 $input->param( -name => "tag_900_indicator1_1123", -value => "" ); $input->param( -name => "tag_900_indicator2_1123", -value => "" ); - $input->param( -name => "tag_900_code_a_1123", -value => 'a' ); + $input->param( -name => "tag_900_code_a_1123", -value => 'a' ); $input->param( -name => "tag_900_subfield_a_1123", -value => "This string has bad \x{1B}characters in it" ); my $record = C4::Biblio::TransformHtmlToMarc($input, 1); @@ -100,7 +100,10 @@ subtest 'Biblio record' => sub { my @fields_900 = $record->field('900'); is( @fields_900, 1, 'The record should have been created with 1 900' ); - is_deeply( $fields_900[0]->subfields(), [ 'a', 'This string has bad characters in it' ], 'Field 900 had its non-XML characters stripped'); + is_deeply( + $fields_900[0]->subfields(), [ 'a', 'This string has bad characters in it' ], + 'Field 900 had its non-XML characters stripped' + ); my @subfields_biblionumber = $record->subfield( $biblionumbertagfield, $biblionumbertagsubfield ); is( @subfields_biblionumber, 1, 'The record should contain only one biblionumber field' ); @@ -116,9 +119,9 @@ subtest 'Biblio record' => sub { is( $all_fields[5]->subfield('a'), 42, 'Sixth field contains bibnumber' ); is( $all_fields[6]->tag, '490', 'Last field is 490' ); - my $new_record = eval { MARC::Record::new_from_xml( $record->as_xml(), 'UTF-8' ); }; + my $new_record = eval { MARC::Record::new_from_xml( $record->as_xml(), 'UTF-8' ); }; my $record_error = $@; - ok( ! $record_error,'No errors parsing MARCXML generated by TransformHtmlToMarc'); + ok( !$record_error, 'No errors parsing MARCXML generated by TransformHtmlToMarc' ); }; -- 2.30.2