X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Freplace.t;h=626cbe9b091bedcc9055c603a35fc262a4f29c81;hb=6b4e4f0d2d52a4b39c68d8f63915ddb7e1e8270e;hp=a1e2d63b6f8932aad5643473d833a787ff93f965;hpb=80b887f29b2ec71d025b4c266a1c26314758994c;p=public-inbox.git
diff --git a/t/replace.t b/t/replace.t
index a1e2d63b..626cbe9b 100644
--- a/t/replace.t
+++ b/t/replace.t
@@ -1,4 +1,4 @@
-# Copyright (C) 2019-2020 all contributors
+# Copyright (C) 2019-2021 all contributors
# License: AGPL-3.0+
use strict;
use warnings;
@@ -20,6 +20,7 @@ sub test_replace ($$$) {
inboxdir => "$tmpdir/testbox",
name => $this,
version => $v,
+ -no_fsync => 1,
-primary_address => 'test@example.com',
indexlevel => $level,
});
@@ -74,7 +75,7 @@ EOF
for my $tip (@$cmts) {
next if !defined $tip;
$changed_epochs++;
- like($tip, qr/\A[a-f0-9]{40}\z/,
+ like($tip, qr/\A[a-f0-9]{40,}\z/,
'replace returned current commit');
}
is($changed_epochs, 1, 'only one epoch changed');
@@ -179,20 +180,19 @@ EOF
}
}
-my $opt = { pre => *pad_msgs };
+my $opt = { pre => \&pad_msgs };
test_replace(2, 'basic', {});
test_replace(2, 'basic', $opt);
-test_replace(2, 'basic', $opt = { %$opt, post => *pad_msgs });
+test_replace(2, 'basic', $opt = { %$opt, post => \&pad_msgs });
test_replace(2, 'basic', $opt = { %$opt, rotate_bytes => 1 });
SKIP: {
- require PublicInbox::Search;
- PublicInbox::Search::load_xapian() or skip 'Search::Xapian missing', 8;
+ require_mods(qw(Search::Xapian), 8);
for my $l (qw(medium)) {
test_replace(2, $l, {});
- $opt = { pre => *pad_msgs };
+ $opt = { pre => \&pad_msgs };
test_replace(2, $l, $opt);
- test_replace(2, $l, $opt = { %$opt, post => *pad_msgs });
+ test_replace(2, $l, $opt = { %$opt, post => \&pad_msgs });
test_replace(2, $l, $opt = { %$opt, rotate_bytes => 1 });
}
};