]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/msgmap.t
extmsg: use Xapian only for partial matches
[public-inbox.git] / t / msgmap.t
index a5232fab6cbc06b75e0aeb3df541f2d8a43c3285..4dddd0a81852b22c60601b1965d1e7b11224897c 100644 (file)
@@ -1,5 +1,5 @@
-# Copyright (C) 2015 all contributors <meta@public-inbox.org>
-# License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
+# Copyright (C) 2015-2018 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;
@@ -38,9 +38,6 @@ foreach my $mid (@mids) {
        is($d->num_for($mid), $mid2num{$mid}, "mid:$mid maps correctly");
 }
 
-is_deeply($d->mid_prefixes('a'), [qw(aa@cc aa@bb a@b)], "mid_prefixes match");
-is_deeply($d->mid_prefixes('A'), [], "mid_prefixes is case sensitive");
-
 is(undef, $d->last_commit, "last commit not set");
 my $lc = 'deadbeef' x 5;
 is(undef, $d->last_commit($lc), 'previous last commit (undef) returned');
@@ -65,4 +62,8 @@ my $orig = $d->mid_insert('spam@1');
 $d->mid_delete('spam@1');
 is($d->mid_insert('spam@2'), 1 + $orig, "last number not recycled");
 
+my $tmp = $d->tmp_clone;
+is_deeply([$d->minmax], [$tmp->minmax], 'Cloned temporary DB matches');
+ok($tmp->mid_delete('spam@2'), 'temporary DB is writable');
+
 done_testing();