From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 113AE1FD45 for ; Sun, 26 Jan 2020 10:29:25 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 4/4] t/v2reindex.t: 5.10.1 glob compatibility Date: Sun, 26 Jan 2020 10:29:24 +0000 Message-Id: <20200126102924.3593-5-e@yhbt.net> In-Reply-To: <20200126102924.3593-1-e@yhbt.net> References: <20200126102924.3593-1-e@yhbt.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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(-) 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;