X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fv2reindex.t;h=7c14117af0514bb1cccff3c3515d17990c776d0f;hb=9253dc860de52360d3bc60710422783457143e3d;hp=a14bf798d6f6c67a8e92532ba0d26460c63a7354;hpb=3c313f9034aac96182e2efdc2f92c40803626f32;p=public-inbox.git
diff --git a/t/v2reindex.t b/t/v2reindex.t
index a14bf798..7c14117a 100644
--- a/t/v2reindex.t
+++ b/t/v2reindex.t
@@ -1,4 +1,4 @@
-# Copyright (C) 2018-2019 all contributors
+# Copyright (C) 2018-2020 all contributors
# License: AGPL-3.0+
use strict;
use warnings;
@@ -8,11 +8,7 @@ use PublicInbox::ContentId qw(content_digest);
use File::Path qw(remove_tree);
use PublicInbox::TestCommon;
require_git(2.6);
-
-foreach my $mod (qw(DBD::SQLite Search::Xapian)) {
- eval "require $mod";
- plan skip_all => "$mod missing for v2reindex.t" if $@;
-}
+require_mods(qw(DBD::SQLite Search::Xapian));
use_ok 'PublicInbox::V2Writable';
my ($inboxdir, $for_destroy) = tmpdir();
my $ibx_config = {
@@ -161,7 +157,7 @@ ok(!-d $xap, 'Xapian directories removed again');
is($ibx->mm->num_highwater, 10, 'num_highwater as expected');
my $mset = $ibx->search->query($phrase, {mset=>1});
isnt($mset->size, 0, "phrase search succeeds on indexlevel=full");
- for (<"$xap/*/*">) { $sizes{$ibx->{indexlevel}} += -s _ if -f $_ }
+ for (glob("$xap/*/*")) { $sizes{$ibx->{indexlevel}} += -s _ if -f $_ }
my ($min, $max) = $ibx->mm->minmax;
is_deeply($ibx->mm->msg_range(\$min, $max), $msgmap, 'msgmap unchanged');
@@ -197,7 +193,7 @@ ok(!-d $xap, 'Xapian directories removed again');
$words =~ tr/"'//d;
my $mset = $ibx->search->query($words, {mset=>1});
isnt($mset->size, 0, "normal search works on indexlevel=medium");
- for (<"$xap/*/*">) { $sizes{$ibx->{indexlevel}} += -s _ if -f $_ }
+ for (glob("$xap/*/*")) { $sizes{$ibx->{indexlevel}} += -s _ if -f $_ }
ok($sizes{full} > $sizes{medium}, 'medium is smaller than full');
@@ -227,7 +223,7 @@ ok(!-d $xap, 'Xapian directories removed again');
isnt($ibx->search, 'no search for basic');
- for (<"$xap/*/*">) { $sizes{$ibx->{indexlevel}} += -s _ if -f $_ }
+ for (glob("$xap/*/*")) { $sizes{$ibx->{indexlevel}} += -s _ if -f $_ }
ok($sizes{medium} > $sizes{basic}, 'basic is smaller than medium');
my ($min, $max) = $ibx->mm->minmax;