]> Sergey Matveev's repositories - public-inbox.git/commitdiff
t/v2reindex.t: 5.10.1 glob compatibility
authorEric Wong <e@yhbt.net>
Sun, 26 Jan 2020 10:29:24 +0000 (10:29 +0000)
committerEric Wong <e@yhbt.net>
Tue, 28 Jan 2020 01:49:54 +0000 (01:49 +0000)
I'm not sure when `for (<"quoted string/glob/*">)' became
supported, and maybe it was inadvertant, but it fails
with Perl 5.10.1.  Just use the glob() function to be
explicit.

t/v2reindex.t

index 2c6bdd571979c0777c5f21293a6024307bb90365..990513a3ac07d024d4d1742a864aaa81105ef2c9 100644 (file)
@@ -157,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');
@@ -193,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');
 
@@ -223,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;