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