use File::Temp qw/tempdir/;
require './t/common.perl';
require_git(2.6);
-my @mods = qw(IPC::Run DBI DBD::SQLite Search::Xapian);
+my @mods = qw(IPC::Run DBI DBD::SQLite);
foreach my $mod (@mods) {
eval "require $mod";
plan skip_all => "missing $mod for t/purge.t" if $@;
EOF
-local $ENV{NPROC} = '1';
my $cfgfile = "$tmpdir/config";
local $ENV{PI_CONFIG} = $cfgfile;
open my $cfg_fh, '>', $cfgfile or die "open: $!";
-my $v2w = PublicInbox::V2Writable->new($ibx, 1);
+my $v2w = PublicInbox::V2Writable->new($ibx, {nproc => 1});
my $mime = PublicInbox::MIME->new($raw);
ok($v2w->add($mime), 'add message to be purged');
$v2w->done;
# a successful case:
ok(IPC::Run::run([$purge, $mainrepo], \$raw, \$out, \$err), 'match OK');
-like($out, qr/^\t[a-f0-9]{40,}/m, 'removed commit noted');
+like($out, qr/\b[a-f0-9]{40,}/m, 'removed commit noted');
# add (old) vger filter to config file
print $cfg_fh <<EOF or die "print $!";
ok(chdir('/'), "chdir / OK for --all test");
ok(IPC::Run::run([$purge, '--all'], \$pre_scrub, \$out, \$err),
'scrub purge OK');
-like($out, qr/^\t[a-f0-9]{40,}/m, 'removed commit noted');
+like($out, qr/\b[a-f0-9]{40,}/m, 'removed commit noted');
# diag "out: $out"; diag "err: $err";
$out = $err = '';