Lines 216-222
subtest 'build_authorities_query_compat() tests' => sub {
Link Here
|
216 |
}; |
216 |
}; |
217 |
|
217 |
|
218 |
subtest 'build_query tests' => sub { |
218 |
subtest 'build_query tests' => sub { |
219 |
plan tests => 53; |
219 |
plan tests => 56; |
220 |
|
220 |
|
221 |
my $qb; |
221 |
my $qb; |
222 |
|
222 |
|
Lines 524-529
subtest 'build_query tests' => sub {
Link Here
|
524 |
); |
524 |
); |
525 |
is($query_cgi, 'idx=&q=new&scan=1', 'query cgi'); |
525 |
is($query_cgi, 'idx=&q=new&scan=1', 'query cgi'); |
526 |
is($query_desc, 'new', 'query desc ok'); |
526 |
is($query_desc, 'new', 'query desc ok'); |
|
|
527 |
|
528 |
my( $limit, $limit_cgi, $limit_desc ); |
529 |
( undef, $query, $simple_query, $query_cgi, $query_desc, $limit, $limit_cgi, $limit_desc ) = $qb->build_query_compat( ['AND'], ['kw:""'], undef, ['author:Dillinger Escaplan', 'mc-itype,phr:BOOK', 'mc-itype,phr:CD'] ); |
530 |
is( $limit, '(author:("Dillinger Escaplan")) AND itype:(("BOOK") OR ("CD"))', "Limit formed correctly when no search terms"); |
531 |
is( $limit_cgi,'&limit=author%3ADillinger%20Escaplan&limit=mc-itype%2Cphr%3ABOOK&limit=mc-itype%2Cphr%3ACD', "Limit CGI formed correctly when no search terms"); |
532 |
is( $limit_desc,'(author:("Dillinger Escaplan")) AND itype:(("BOOK") OR ("CD"))',"Limit desc formed correctly when no search terms"); |
527 |
}; |
533 |
}; |
528 |
|
534 |
|
529 |
|
535 |
|
530 |
- |
|
|