Lines 109-119
subtest 'test_search' => sub {
Link Here
|
109 |
|
109 |
|
110 |
is($rs->size(), 2, 'Two results returned'); |
110 |
is($rs->size(), 2, 'Two results returned'); |
111 |
|
111 |
|
112 |
my $returned1 = MARC::Record->new_from_xml($rs->record(0)->raw()); |
112 |
my $returned1 = MARC::Record->new_from_xml($rs->record(0)->raw(), 'UTF-8'); |
113 |
ok($returned1, 'Record 1 returned as MARCXML'); |
113 |
ok($returned1, 'Record 1 returned as MARCXML'); |
114 |
is($returned1->as_xml, $marc_record_1->as_xml, 'Record 1 returned properly'); |
114 |
is($returned1->as_xml, $marc_record_1->as_xml, 'Record 1 returned properly'); |
115 |
|
115 |
|
116 |
my $returned2= MARC::Record->new_from_xml($rs->record(1)->raw()); |
116 |
my $returned2= MARC::Record->new_from_xml($rs->record(1)->raw(), 'UTF-8'); |
117 |
ok($returned2, 'Record 2 returned as MARCXML'); |
117 |
ok($returned2, 'Record 2 returned as MARCXML'); |
118 |
is($returned2->as_xml, $marc_record_2->as_xml, 'Record 2 returned properly'); |
118 |
is($returned2->as_xml, $marc_record_2->as_xml, 'Record 2 returned properly'); |
119 |
|
119 |
|
Lines 140-150
subtest 'test_search' => sub {
Link Here
|
140 |
my @records = $nodes[0]->getElementsByTagNameNS($marc_ns, 'record'); |
140 |
my @records = $nodes[0]->getElementsByTagNameNS($marc_ns, 'record'); |
141 |
is(scalar(@records), 2, 'Two results returned'); |
141 |
is(scalar(@records), 2, 'Two results returned'); |
142 |
|
142 |
|
143 |
$returned1 = MARC::Record->new_from_xml($records[0]->toString()); |
143 |
$returned1 = MARC::Record->new_from_xml($records[0]->toString(), 'UTF-8'); |
144 |
ok($returned1, 'Record 1 returned as MARCXML'); |
144 |
ok($returned1, 'Record 1 returned as MARCXML'); |
145 |
is($returned1->as_xml, $marc_record_1->as_xml, 'Record 1 returned properly'); |
145 |
is($returned1->as_xml, $marc_record_1->as_xml, 'Record 1 returned properly'); |
146 |
|
146 |
|
147 |
$returned2= MARC::Record->new_from_xml($records[1]->toString()); |
147 |
$returned2= MARC::Record->new_from_xml($records[1]->toString(), 'UTF-8'); |
148 |
ok($returned2, 'Record 2 returned as MARCXML'); |
148 |
ok($returned2, 'Record 2 returned as MARCXML'); |
149 |
is($returned2->as_xml, $marc_record_2->as_xml, 'Record 2 returned properly'); |
149 |
is($returned2->as_xml, $marc_record_2->as_xml, 'Record 2 returned properly'); |
150 |
|
150 |
|