Lines 169-175
subtest 'build_authorities_query_compat() tests' => sub {
Link Here
|
169 |
}; |
169 |
}; |
170 |
|
170 |
|
171 |
subtest 'build_query tests' => sub { |
171 |
subtest 'build_query tests' => sub { |
172 |
plan tests => 40; |
172 |
plan tests => 42; |
173 |
|
173 |
|
174 |
my $qb; |
174 |
my $qb; |
175 |
|
175 |
|
Lines 414-419
subtest 'build_query tests' => sub {
Link Here
|
414 |
'(title:"donald duck")', |
414 |
'(title:"donald duck")', |
415 |
"query of specific field is not added AND suppress:0" |
415 |
"query of specific field is not added AND suppress:0" |
416 |
); |
416 |
); |
|
|
417 |
|
418 |
( undef, $query ) = $qb->build_query_compat( ['AND'], ['title:"donald duck"'], undef, ['author:Dillinger Escaplan'] ); |
419 |
is( |
420 |
$query->{query}{query_string}{query}, |
421 |
'(title:"donald duck") AND author:(Dillinger Escaplan)', |
422 |
"Simplle query with limit's term in parentheses" |
423 |
); |
424 |
|
425 |
( undef, $query ) = $qb->build_query_compat( ['AND'], ['title:"donald duck"'], undef, ['author:Dillinger Escaplan', 'itype:BOOK'] ); |
426 |
is( |
427 |
$query->{query}{query_string}{query}, |
428 |
'(title:"donald duck") AND (author:(Dillinger Escaplan)) AND (itype:(BOOK))', |
429 |
"Simplle query with each limit's term in parentheses" |
430 |
); |
417 |
is($query_cgi, 'idx=&q=title%3A%22donald%20duck%22', 'query cgi'); |
431 |
is($query_cgi, 'idx=&q=title%3A%22donald%20duck%22', 'query cgi'); |
418 |
is($query_desc, 'title:"donald duck"', 'query desc ok'); |
432 |
is($query_desc, 'title:"donald duck"', 'query desc ok'); |
419 |
}; |
433 |
}; |
420 |
- |
|
|