about summary refs log tree commit
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-01-26 10:29:24 +0000
committerEric Wong <e@yhbt.net>2020-01-28 01:49:54 +0000
commit0f81681256c9f24c37759e26c6c21db187374438 (patch)
tree0e18cba0a3788d3a45c5aa09b013f2b7fe4a3721
parentdd694f1c3797ce0ca7a4748a97f8af536ef21c2e (diff)
downloadpublic-inbox-0f81681256c9f24c37759e26c6c21db187374438.tar.gz
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.
-rw-r--r--t/v2reindex.t6
1 files changed, 3 insertions, 3 deletions
diff --git a/t/v2reindex.t b/t/v2reindex.t
index 2c6bdd57..990513a3 100644
--- a/t/v2reindex.t
+++ b/t/v2reindex.t
@@ -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;