|
Lines 656-684
ok(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],'
Link Here
|
| 656 |
"Warning is raised correctly for invalid tags in MARC::Record"; |
656 |
"Warning is raised correctly for invalid tags in MARC::Record"; |
| 657 |
is(scalar(@newresults), 0, 'a record that cannot be parsed by MARC::Record is simply skipped (bug 10684)'); |
657 |
is(scalar(@newresults), 0, 'a record that cannot be parsed by MARC::Record is simply skipped (bug 10684)'); |
| 658 |
|
658 |
|
| 659 |
# Testing exploding indexes |
|
|
| 660 |
my $term; |
| 661 |
my $searchmodule = new Test::MockModule('C4::Search'); |
| 662 |
$searchmodule->mock('SimpleSearch', sub { |
| 663 |
my $query = shift; |
| 664 |
|
| 665 |
is($query, "he:$term", "Searching for expected term '$term' for exploding") or return '', [], 0; |
| 666 |
|
| 667 |
my $record = MARC::Record->new; |
| 668 |
if ($query =~ m/Arizona/) { |
| 669 |
$record->add_fields( |
| 670 |
[ '001', '1234' ], |
| 671 |
[ '151', ' ', ' ', a => 'Arizona' ], |
| 672 |
[ '551', ' ', ' ', a => 'United States', w => 'g' ], |
| 673 |
[ '551', ' ', ' ', a => 'Maricopa County', w => 'h' ], |
| 674 |
[ '551', ' ', ' ', a => 'Navajo County', w => 'h' ], |
| 675 |
[ '551', ' ', ' ', a => 'Pima County', w => 'h' ], |
| 676 |
[ '551', ' ', ' ', a => 'New Mexico' ], |
| 677 |
); |
| 678 |
} |
| 679 |
return '', [ $record->as_usmarc() ], 1; |
| 680 |
}); |
| 681 |
|
| 682 |
my ($auths, $count) = SearchAuthorities( |
659 |
my ($auths, $count) = SearchAuthorities( |
| 683 |
['mainentry'], ['and'], [''], ['starts'], |
660 |
['mainentry'], ['and'], [''], ['starts'], |
| 684 |
['shakespeare'], 0, 10, '', '', 1 |
661 |
['shakespeare'], 0, 10, '', '', 1 |
| 685 |
- |
|
|