Bug 23086: Unit test
authorNick Clemens <nick@bywatersolutions.com>
Wed, 15 Jul 2020 15:33:18 +0000 (15:33 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 27 Jul 2020 15:24:26 +0000 (17:24 +0200)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

t/db_dependent/Search.t

index 880f520..c8cc3d7 100644 (file)
@@ -668,6 +668,12 @@ ok(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],'
     $query_type ) = buildQuery([], [ 0 ], [ 'su,phr' ], [], [], 0, 'en');
     is($query, 'su,phr=0 ', 'buildQuery should keep 0 value');
 
+    # Bug 23086
+    ( $error, $query, $simple_query, $query_cgi,
+    $query_desc, $limit, $limit_cgi, $limit_desc,
+    $query_type ) = buildQuery([], [], [], [ 'mc-ccode:NF(IC'], [], 0, 'en');
+    like($query, qr/ccode="NF\(IC"/, "Limit quoted correctly");
+
     # Let's see what happens when we pass bad data into these routines.
     # We have to catch warnings since we're not very good about returning errors.
 
@@ -906,7 +912,7 @@ sub run_unimarc_search_tests {
 }
 
 subtest 'MARC21 + DOM' => sub {
-    plan tests => 87;
+    plan tests => 88;
     run_marc21_search_tests();
 };