|
Lines 12-18
use YAML;
Link Here
|
| 12 |
use C4::Debug; |
12 |
use C4::Debug; |
| 13 |
require C4::Context; |
13 |
require C4::Context; |
| 14 |
|
14 |
|
| 15 |
use Test::More tests => 232; |
15 |
# work around spurious wide character warnings |
|
|
16 |
use open ':std', ':encoding(utf8)'; |
| 17 |
|
| 18 |
use Test::More tests => 4; |
| 16 |
use Test::MockModule; |
19 |
use Test::MockModule; |
| 17 |
use MARC::Record; |
20 |
use MARC::Record; |
| 18 |
use File::Spec; |
21 |
use File::Spec; |
|
Lines 23-32
use File::Temp qw/ tempdir /;
Link Here
|
| 23 |
use File::Path; |
26 |
use File::Path; |
| 24 |
use DBI; |
27 |
use DBI; |
| 25 |
|
28 |
|
| 26 |
# work around spurious wide character warnings |
|
|
| 27 |
binmode Test::More->builder->output, ":utf8"; |
| 28 |
binmode Test::More->builder->failure_output, ":utf8"; |
| 29 |
|
| 30 |
our $child; |
29 |
our $child; |
| 31 |
our $datadir; |
30 |
our $datadir; |
| 32 |
|
31 |
|
|
Lines 788-799
sub run_marc21_search_tests {
Link Here
|
| 788 |
# retrieve records that are larger than the MARC limit of 99,999 octets |
787 |
# retrieve records that are larger than the MARC limit of 99,999 octets |
| 789 |
( undef, $results_hashref, $facets_loop ) = |
788 |
( undef, $results_hashref, $facets_loop ) = |
| 790 |
getRecords('ti:marc the large record', '', [], [ 'biblioserver' ], '20', 0, undef, \%branches, \%itemtypes, 'ccl', undef); |
789 |
getRecords('ti:marc the large record', '', [], [ 'biblioserver' ], '20', 0, undef, \%branches, \%itemtypes, 'ccl', undef); |
| 791 |
is($results_hashref->{biblioserver}->{hits}, 1, "can do a search that retrieves an over-large bib record (bug 11096)"); |
790 |
is($results_hashref->{biblioserver}->{hits}, 1, "Can do a search that retrieves an over-large bib record (bug 11096)"); |
| 792 |
@newresults = searchResults('opac', $query_desc, $results_hashref->{'biblioserver'}->{'hits'}, 10, 0, 0, |
791 |
@newresults = searchResults('opac', $query_desc, $results_hashref->{'biblioserver'}->{'hits'}, 10, 0, 0, |
| 793 |
$results_hashref->{'biblioserver'}->{"RECORDS"}); |
792 |
$results_hashref->{'biblioserver'}->{"RECORDS"}); |
| 794 |
is($newresults[0]->{title}, 'Marc the Large Record', 'able to render over-large bib record (bug 11096)'); |
793 |
is($newresults[0]->{title}, 'Marc the Large Record', 'Able to render the title for over-large bib record (bug 11096)'); |
| 795 |
is($newresults[0]->{biblionumber}, '300', 'able to render over-large bib record (bug 11096)'); |
794 |
is($newresults[0]->{biblionumber}, '300', 'Over-large bib record has the correct biblionumber (bug 11096)'); |
| 796 |
like($newresults[0]->{notes}, qr/This is large note #550/, 'able to render over-large bib record (bug 11096)'); |
795 |
like($newresults[0]->{notes}, qr/This is large note #550/, 'Able to render the notes field for over-large bib record (bug 11096)'); |
| 797 |
|
796 |
|
| 798 |
cleanup(); |
797 |
cleanup(); |
| 799 |
} |
798 |
} |
|
Lines 869-878
sub run_unimarc_search_tests {
Link Here
|
| 869 |
cleanup(); |
868 |
cleanup(); |
| 870 |
} |
869 |
} |
| 871 |
|
870 |
|
| 872 |
run_marc21_search_tests('grs1'); |
871 |
subtest 'MARC21 + GRS-1' => sub { |
| 873 |
run_marc21_search_tests('dom'); |
872 |
plan tests => 103; |
| 874 |
|
873 |
run_marc21_search_tests('grs1'); |
| 875 |
run_unimarc_search_tests('grs1'); |
874 |
}; |
| 876 |
run_unimarc_search_tests('dom'); |
875 |
|
|
|
876 |
subtest 'MARC21 + DOM' => sub { |
| 877 |
plan tests => 103; |
| 878 |
run_marc21_search_tests('dom'); |
| 879 |
}; |
| 880 |
|
| 881 |
subtest 'UNIMARC + GRS-1' => sub { |
| 882 |
plan tests => 13; |
| 883 |
run_unimarc_search_tests('grs1'); |
| 884 |
}; |
| 885 |
|
| 886 |
subtest 'UNIMARC + DOM' => sub { |
| 887 |
plan tests => 13; |
| 888 |
run_unimarc_search_tests('dom'); |
| 889 |
}; |
| 877 |
|
890 |
|
| 878 |
1; |
891 |
1; |
| 879 |
- |
|
|