]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/replace.t
www: drop --subject from "git send-email" instructions
[public-inbox.git] / t / replace.t
index 95241adf6842282eae8b4ce805d42b79ec8c5c02..626cbe9b091bedcc9055c603a35fc262a4f29c81 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2019-2020 all contributors <meta@public-inbox.org>
+# Copyright (C) 2019-2021 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 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');
@@ -186,8 +187,7 @@ 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 };