|
Lines 192-198
subtest 'build_authorities_query_compat() tests' => sub {
Link Here
|
| 192 |
}; |
192 |
}; |
| 193 |
|
193 |
|
| 194 |
subtest 'build_query tests' => sub { |
194 |
subtest 'build_query tests' => sub { |
| 195 |
plan tests => 40; |
195 |
plan tests => 42; |
| 196 |
|
196 |
|
| 197 |
my $qb; |
197 |
my $qb; |
| 198 |
|
198 |
|
|
Lines 437-442
subtest 'build_query tests' => sub {
Link Here
|
| 437 |
'(title:"donald duck")', |
437 |
'(title:"donald duck")', |
| 438 |
"query of specific field is not added AND suppress:0" |
438 |
"query of specific field is not added AND suppress:0" |
| 439 |
); |
439 |
); |
|
|
440 |
|
| 441 |
( undef, $query ) = $qb->build_query_compat( ['AND'], ['title:"donald duck"'], undef, ['author:Dillinger Escaplan'] ); |
| 442 |
is( |
| 443 |
$query->{query}{query_string}{query}, |
| 444 |
'(title:"donald duck") AND author:(Dillinger Escaplan)', |
| 445 |
"Simplle query with limit's term in parentheses" |
| 446 |
); |
| 447 |
|
| 448 |
( undef, $query ) = $qb->build_query_compat( ['AND'], ['title:"donald duck"'], undef, ['author:Dillinger Escaplan', 'itype:BOOK'] ); |
| 449 |
is( |
| 450 |
$query->{query}{query_string}{query}, |
| 451 |
'(title:"donald duck") AND (author:(Dillinger Escaplan)) AND (itype:(BOOK))', |
| 452 |
"Simplle query with each limit's term in parentheses" |
| 453 |
); |
| 440 |
is($query_cgi, 'idx=&q=title%3A%22donald%20duck%22', 'query cgi'); |
454 |
is($query_cgi, 'idx=&q=title%3A%22donald%20duck%22', 'query cgi'); |
| 441 |
is($query_desc, 'title:"donald duck"', 'query desc ok'); |
455 |
is($query_desc, 'title:"donald duck"', 'query desc ok'); |
| 442 |
}; |
456 |
}; |
| 443 |
- |
|
|