about summary refs log tree commit homepage
path: root/t/convert-compact.t
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-05-01 18:04:45 +0000
committerEric Wong <e@yhbt.net>2020-05-03 09:29:29 +0000
commitff53e6728ff67fef548f0f472c1918a00d7104f7 (patch)
tree8d2393244771d1682ff247e852d83d9c91491643 /t/convert-compact.t
parent85431deb9a346bc83a7f5e8e0f102e19dfa603a9 (diff)
downloadpublic-inbox-ff53e6728ff67fef548f0f472c1918a00d7104f7.tar.gz
Perl 5.10.1 would warn about implicit assignment to @_ by
split().  So favor the documented method of using `tr'
to count lines.

Fixes: b5ddcb3352ef31ae ("index: support --compact / -c on command-line")
Diffstat (limited to 't/convert-compact.t')
-rw-r--r--t/convert-compact.t3
1 files changed, 1 insertions, 2 deletions
diff --git a/t/convert-compact.t b/t/convert-compact.t
index ae299021..1627e019 100644
--- a/t/convert-compact.t
+++ b/t/convert-compact.t
@@ -124,7 +124,6 @@ $rdr->{2} = \(my $err2 = '');
 $cmd = [ qw(-index --reindex -cc), "$tmpdir/v2" ];
 ok(run_script($cmd, undef, $rdr), '--reindex -c -c');
 like($err2, qr/xapian-compact/, 'xapian-compact ran (-c -c)');
-ok(scalar(split(/\n/, $err2)) > scalar(split(/\n/, $err)),
-        '-compacted twice');
+ok(($err2 =~ tr/\n/\n/) > ($err =~ tr/\n/\n/), '-compacted twice');
 
 done_testing();