Lines 187-193
subtest '_split_query() tests' => sub {
Link Here
|
187 |
}; |
187 |
}; |
188 |
|
188 |
|
189 |
subtest '_clean_search_term() tests' => sub { |
189 |
subtest '_clean_search_term() tests' => sub { |
190 |
plan tests => 12; |
190 |
plan tests => 14; |
191 |
|
191 |
|
192 |
my $qb; |
192 |
my $qb; |
193 |
ok( |
193 |
ok( |
Lines 207-212
subtest '_clean_search_term() tests' => sub {
Link Here
|
207 |
$res = $qb->_clean_search_term('"unbalanced "quotes"'); |
207 |
$res = $qb->_clean_search_term('"unbalanced "quotes"'); |
208 |
is($res, ' unbalanced quotes ', 'unbalanced quotes removed'); |
208 |
is($res, ' unbalanced quotes ', 'unbalanced quotes removed'); |
209 |
|
209 |
|
|
|
210 |
$res = $qb->_clean_search_term(':test query'); |
211 |
is($res, 'test query', 'colon at the start removed'); |
212 |
|
213 |
$res = $qb->_clean_search_term('test query:'); |
214 |
is($res, 'test query', 'colon at the end removed'); |
215 |
|
210 |
$res = $qb->_clean_search_term('test : query'); |
216 |
$res = $qb->_clean_search_term('test : query'); |
211 |
is($res, 'test query', 'dangling colon removed'); |
217 |
is($res, 'test query', 'dangling colon removed'); |
212 |
|
218 |
|
213 |
- |
|
|