]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/altid_v2.t
www: drop --subject from "git send-email" instructions
[public-inbox.git] / t / altid_v2.t
index 493982a115b094ff01ecc9f88b70a69facb16190..281a09d51dd0cfe4af5ed0b5590ec97b8a74b68c 100644 (file)
@@ -5,15 +5,15 @@ use strict;
 use v5.10.1;
 use PublicInbox::TestCommon;
 use PublicInbox::Eml;
-use PublicInbox::Msgmap;
 require_git(2.6);
 require_mods(qw(DBD::SQLite Search::Xapian));
+require PublicInbox::Msgmap;
 my $another = 'another-nntp.sqlite3';
 my $altid = [ "serial:gmane:file=$another" ];
 my $ibx = create_inbox 'v2', version => 2, indexlevel => 'medium',
                        altid => $altid, sub {
        my ($im, $ibx) = @_;
-       my $mm = PublicInbox::Msgmap->new_file("$ibx->{inboxdir}/$another", 1);
+       my $mm = PublicInbox::Msgmap->new_file("$ibx->{inboxdir}/$another", 2);
        $mm->mid_set(1234, 'a@example.com') == 1 or BAIL_OUT 'mid_set once';
        ok(0 == $mm->mid_set(1234, 'a@example.com'), 'mid_set not idempotent');
        ok(0 == $mm->mid_set(1, 'a@example.com'), 'mid_set fails with dup MID');
@@ -26,7 +26,7 @@ Message-ID: <a@example.com>
 hello world gmane:666
 EOF
 };
-my $mm = PublicInbox::Msgmap->new_file("$ibx->{inboxdir}/$another", 1);
+my $mm = PublicInbox::Msgmap->new_file("$ibx->{inboxdir}/$another", 2);
 ok(0 == $mm->mid_set(1234, 'a@example.com'), 'mid_set not idempotent');
 ok(0 ==  $mm->mid_set(1, 'a@example.com'), 'mid_set fails with dup MID');
 my $mset = $ibx->search->mset('gmane:1234');