From 2508d244a4dad2da233d75e50f59aaea04c1e12a Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 11 Feb 2020 17:45:14 +0100 Subject: [PATCH] Bug 24586: Add tests Not sure about this approach. Maybe we are hiding a problem coming from somewhere else. Maybe better to handle the error from the callers. --- t/db_dependent/Search.t | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Search.t b/t/db_dependent/Search.t index 60da046249..a4b2544a0d 100644 --- a/t/db_dependent/Search.t +++ b/t/db_dependent/Search.t @@ -814,6 +814,14 @@ ok(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],' ); is($count, 1, 'MARC21 authorities: one hit on match contains "沙士北亞威廉姆" (QP)'); + warning_like { + SearchAuthorities( + ['^{"#\~@'], ['ax"nd'], [''], ['st"axrts'], + ['sha"kespeare'], 0, 10, '', '', 1 + ) + } qr{^Bad PQF query: }, + "SearchAuthorties should handle bad PQF query"; + # retrieve records that are larger than the MARC limit of 99,999 octets ( undef, $results_hashref, $facets_loop ) = getRecords('ti:marc the large record', '', [], [ 'biblioserver' ], '20', 0, \%branches, \%itemtypes, 'ccl', undef); @@ -971,7 +979,7 @@ sub run_unimarc_search_tests { } subtest 'MARC21 + DOM' => sub { - plan tests => 112; + plan tests => 113; run_marc21_search_tests(); }; -- 2.11.0