You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add regression tests to ensure it no longer chokes on null bytes.
Fixespgxn/pgxn-api#23 and pgxn/pgxn-api#23.
Stop skipping tests against Lucy 0.002002, which is no longer supported.
Add developer dependencies and drop for Perl 5.10.
Timestamp for v0.11.1.
Copy file name to clipboardExpand all lines: t/base.t
+48-34Lines changed: 48 additions & 34 deletions
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,8 @@
3
3
use strict;
4
4
use warnings;
5
5
use utf8;
6
-
use Test::More tests=>37;
7
-
#use Test::More 'no_plan';
6
+
use Test::More tests=>41;
7
+
#use Test::More 'no_plan';
8
8
use Lucy::Plan::Schema;
9
9
use Lucy::Plan::FullTextType;
10
10
use Lucy::Analysis::PolyAnalyzer;
@@ -276,37 +276,32 @@ like delete $res->{hits}[0]{score}, qr/^\d+[.]\d+$/,
276
276
like delete$res->{hits}[1]{score}, qr/^\d+[.]\d+$/,
277
277
'Second hit score should look like a score';
278
278
279
-
TODO: {
280
-
# Hack to work around bug in Lucy 0.2.2.
281
-
local$TODO = 'Lucy 0.2.2 is broken'if Lucy->VERSION == 0.002002;
282
-
283
-
is_deeply $res, {
284
-
query=>"ordered pair",
285
-
limit=> 50,
286
-
offset=> 0,
287
-
count=> 2,
288
-
hits=> [
289
-
{
290
-
abstract=>"A key/value pair data type",
291
-
date=>"2010-10-18T15:24:21Z",
292
-
dist=>"pair",
293
-
excerpt=>"This is the <strong>pair</strong> README file. Here you will find all thingds related to <strong>pair</strong>, including installation information",
294
-
user=>"theory",
295
-
user_name=>"David E. Wheeler",
296
-
version=>"0.1.0",
297
-
},
298
-
{
299
-
abstract=>"A semantic version data type",
300
-
date=>"2010-10-18T15:24:21Z",
301
-
dist=>"semver",
302
-
excerpt=>"README for the semver distribion. Installation instructions",
303
-
user=>"roger",
304
-
user_name=>"Roger Davidson",
305
-
version=>"2.1.3",
306
-
},
307
-
],
308
-
}, 'Should have results for simple search';
309
-
}
279
+
is_deeply $res, {
280
+
query=>"ordered pair",
281
+
limit=> 50,
282
+
offset=> 0,
283
+
count=> 2,
284
+
hits=> [
285
+
{
286
+
abstract=>"A key/value pair data type",
287
+
date=>"2010-10-18T15:24:21Z",
288
+
dist=>"pair",
289
+
excerpt=>"This is the <strong>pair</strong> README file. Here you will find all thingds related to <strong>pair</strong>, including installation information",
290
+
user=>"theory",
291
+
user_name=>"David E. Wheeler",
292
+
version=>"0.1.0",
293
+
},
294
+
{
295
+
abstract=>"A semantic version data type",
296
+
date=>"2010-10-18T15:24:21Z",
297
+
dist=>"semver",
298
+
excerpt=>"README for the semver distribion. Installation instructions",
299
+
user=>"roger",
300
+
user_name=>"Roger Davidson",
301
+
version=>"2.1.3",
302
+
},
303
+
],
304
+
}, 'Should have results for simple search';
310
305
311
306
# Test offset.
312
307
ok $res = $search->search(
@@ -447,7 +442,6 @@ is_deeply $res, {
447
442
],
448
443
}, 'Should have expected structure for extensions';
449
444
450
-
451
445
ok $res = $search->search( query=>'Davidson', in=>'users' ), 'Seach users';
452
446
like delete$res->{hits}[0]{score}, qr/^\d+[.]\d+$/,
0 commit comments