X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=blobdiff_plain;f=t%2Fv2reindex.t;h=ae1570edbdd57876be3993da76467751c768777d;hp=a2fc20757d2f0a33e4d90918aa1e4fe5d977da36;hb=80b887f29b2ec71d025b4c266a1c26314758994c;hpb=851aa7183cf2b152d7ff187729bc896597d22fad diff --git a/t/v2reindex.t b/t/v2reindex.t index a2fc2075..ae1570ed 100644 --- a/t/v2reindex.t +++ b/t/v2reindex.t @@ -153,7 +153,7 @@ ok(!-d $xap, 'Xapian directories removed again'); delete $ibx->{mm}; is_deeply([ $ibx->mm->minmax ], $minmax, 'minmax unchanged'); is($ibx->mm->num_highwater, 10, 'num_highwater as expected'); - my $mset = $ibx->search->query($phrase, {mset=>1}); + my $mset = $ibx->search->mset($phrase); isnt($mset->size, 0, "phrase search succeeds on indexlevel=full"); for (glob("$xap/*/*")) { $sizes{$ibx->{indexlevel}} += -s _ if -f $_ } @@ -184,12 +184,12 @@ ok(!-d $xap, 'Xapian directories removed again'); # not sure why, but Xapian seems to fallback to terms and # phrase searches still work delete $ibx->{search}; - my $mset = $ibx->search->query($phrase, {mset=>1}); + my $mset = $ibx->search->mset($phrase); is($mset->size, 0, 'phrase search does not work on medium'); } my $words = $phrase; $words =~ tr/"'//d; - my $mset = $ibx->search->query($words, {mset=>1}); + my $mset = $ibx->search->mset($words); isnt($mset->size, 0, "normal search works on indexlevel=medium"); for (glob("$xap/*/*")) { $sizes{$ibx->{indexlevel}} += -s _ if -f $_ } @@ -531,7 +531,8 @@ EOF my %uniq; for my $s (qw(uno dos tres)) { - my $msgs = $ibx->search->query("s:$s"); + my $mset = $ibx->search->mset("s:$s"); + my $msgs = $ibx->search->mset_to_smsg($ibx, $mset); is(scalar(@$msgs), 1, "only one result for `$s'"); $uniq{$msgs->[0]->{num}}++; }