]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/v2reindex.t
www: drop --subject from "git send-email" instructions
[public-inbox.git] / t / v2reindex.t
index e9f2b73b2b9083060359a45300c2fc286f173853..cafe8648d1e8b0dd1275f6af884585402e5aee70 100644 (file)
@@ -1,12 +1,9 @@
 # Copyright (C) 2018-2021 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
-use strict;
-use warnings;
-use Test::More;
+use strict; use v5.10.1; use PublicInbox::TestCommon;
 use PublicInbox::Eml;
 use PublicInbox::ContentHash qw(content_digest);
 use File::Path qw(remove_tree);
-use PublicInbox::TestCommon;
 require_git(2.6);
 require_mods(qw(DBD::SQLite Search::Xapian));
 use_ok 'PublicInbox::V2Writable';
@@ -551,9 +548,8 @@ ok(run_script([qw(-index --reindex --xapian-only), $inboxdir], $env, $rdr),
 is($err, '', 'no errors from --xapian-only');
 undef $for_destroy;
 SKIP: {
-       use PublicInbox::Spawn qw(which);
        skip 'only testing lsof(8) output on Linux', 1 if $^O ne 'linux';
-       my $lsof = which('lsof') or skip 'no lsof in PATH', 1;
+       my $lsof = require_cmd('lsof', 1) or skip 'no lsof in PATH', 1;
        my $rdr = { 2 => \(my $null_err) };
        my @d = grep(m!/xap[0-9]+/!, xqx([$lsof, '-p', $$], undef, $rdr));
        is_deeply(\@d, [], 'no deleted index files') or diag explain(\@d);