From 0f81681256c9f24c37759e26c6c21db187374438 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 26 Jan 2020 10:29:24 +0000 Subject: t/v2reindex.t: 5.10.1 glob compatibility 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 't') 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; -- cgit v1.2.3-24-ge0c7