diff --git a/t/db_dependent/Search.t b/t/db_dependent/Search.t index 2a7215def8..d358e98427 100644 --- a/t/db_dependent/Search.t +++ b/t/db_dependent/Search.t @@ -12,7 +12,7 @@ use YAML; use C4::Debug; require C4::Context; -use Test::More tests => 212; +use Test::More tests => 216; use Test::MockModule; use MARC::Record; use File::Spec; @@ -742,6 +742,20 @@ sub run_marc21_search_tests { ); is($count, 1, 'MARC21 authorities: one hit on match contains "沙士北亞威廉姆"'); + $UseQueryParser = 1; + + ($auths, $count) = SearchAuthorities( + ['mainentry'], ['and'], [''], ['starts'], + ['shakespeare'], 0, 10, '', '', 1 + ); + is($count, 1, 'MARC21 authorities: one hit on mainentry starts with "shakespeare" (QP)'); + ($auths, $count) = SearchAuthorities( + ['match'], ['and'], [''], ['contains'], + ['沙士北亞威廉姆'], 0, 10, '', '', 1 + ); + is($count, 1, 'MARC21 authorities: one hit on match contains "沙士北亞威廉姆" (QP)'); + + cleanup(); }