|
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 => 216; |
15 |
use Test::More tests => 224; |
| 16 |
use Test::MockModule; |
16 |
use Test::MockModule; |
| 17 |
use MARC::Record; |
17 |
use MARC::Record; |
| 18 |
use File::Spec; |
18 |
use File::Spec; |
|
Lines 737-742
sub run_marc21_search_tests {
Link Here
|
| 737 |
); |
737 |
); |
| 738 |
is($count, 1, 'MARC21 authorities: one hit on mainentry starts with "shakespeare"'); |
738 |
is($count, 1, 'MARC21 authorities: one hit on mainentry starts with "shakespeare"'); |
| 739 |
($auths, $count) = SearchAuthorities( |
739 |
($auths, $count) = SearchAuthorities( |
|
|
740 |
['mainentry'], ['and'], [''], ['starts'], |
| 741 |
['shakespeare'], 0, 10, '', 'HeadingAsc', 1 |
| 742 |
); |
| 743 |
is($count, 1, 'MARC21 authorities: one hit on mainentry starts with "shakespeare" sorted by heading ascending'); |
| 744 |
($auths, $count) = SearchAuthorities( |
| 745 |
['mainentry'], ['and'], [''], ['starts'], |
| 746 |
['shakespeare'], 0, 10, '', 'HeadingDsc', 1 |
| 747 |
); |
| 748 |
is($count, 1, 'MARC21 authorities: one hit on mainentry starts with "shakespeare" sorted by heading descending'); |
| 749 |
($auths, $count) = SearchAuthorities( |
| 740 |
['match'], ['and'], [''], ['contains'], |
750 |
['match'], ['and'], [''], ['contains'], |
| 741 |
['沙士北亞威廉姆'], 0, 10, '', '', 1 |
751 |
['沙士北亞威廉姆'], 0, 10, '', '', 1 |
| 742 |
); |
752 |
); |
|
Lines 750-755
sub run_marc21_search_tests {
Link Here
|
| 750 |
); |
760 |
); |
| 751 |
is($count, 1, 'MARC21 authorities: one hit on mainentry starts with "shakespeare" (QP)'); |
761 |
is($count, 1, 'MARC21 authorities: one hit on mainentry starts with "shakespeare" (QP)'); |
| 752 |
($auths, $count) = SearchAuthorities( |
762 |
($auths, $count) = SearchAuthorities( |
|
|
763 |
['mainentry'], ['and'], [''], ['starts'], |
| 764 |
['shakespeare'], 0, 10, '', 'HeadingAsc', 1 |
| 765 |
); |
| 766 |
is($count, 1, 'MARC21 authorities: one hit on mainentry starts with "shakespeare" sorted by heading ascending (QP)'); |
| 767 |
($auths, $count) = SearchAuthorities( |
| 768 |
['mainentry'], ['and'], [''], ['starts'], |
| 769 |
['shakespeare'], 0, 10, '', 'HeadingDsc', 1 |
| 770 |
); |
| 771 |
is($count, 1, 'MARC21 authorities: one hit on mainentry starts with "shakespeare" sorted by heading descending (QP)'); |
| 772 |
($auths, $count) = SearchAuthorities( |
| 753 |
['match'], ['and'], [''], ['contains'], |
773 |
['match'], ['and'], [''], ['contains'], |
| 754 |
['沙士北亞威廉姆'], 0, 10, '', '', 1 |
774 |
['沙士北亞威廉姆'], 0, 10, '', '', 1 |
| 755 |
); |
775 |
); |
| 756 |
- |
|
|