@@ -, +, @@ --- t/Koha/SearchEngine/Elasticsearch/QueryBuilder.t | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/t/Koha/SearchEngine/Elasticsearch/QueryBuilder.t +++ a/t/Koha/SearchEngine/Elasticsearch/QueryBuilder.t @@ -187,7 +187,7 @@ subtest '_split_query() tests' => sub { }; subtest 'clean_search_term() tests' => sub { - plan tests => 24; + plan tests => 25; my $qb; ok( @@ -239,6 +239,9 @@ subtest 'clean_search_term() tests' => sub { $res = $qb->clean_search_term('test! and more'); is($res, 'test and more', 'remove exclamation sign at with space after it'); + $res = $qb->clean_search_term('test! and more (and more!)'); + is($res, 'test and more (and more)', 'remove exclamation sign followed by close parentheses'); + $res = $qb->clean_search_term('!test'); is($res, '!test', 'exclamation sign left untouched'); --