X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fmsgmap.t;h=4dddd0a81852b22c60601b1965d1e7b11224897c;hb=a46893a2b5dabfdbcf7b593ac19967daecfb1772;hp=a5232fab6cbc06b75e0aeb3df541f2d8a43c3285;hpb=1e57ecc0dcbc64a6829a93dc81cfb6ab6f0ce71b;p=public-inbox.git diff --git a/t/msgmap.t b/t/msgmap.t index a5232fab..4dddd0a8 100644 --- a/t/msgmap.t +++ b/t/msgmap.t @@ -1,5 +1,5 @@ -# Copyright (C) 2015 all contributors -# License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt) +# Copyright (C) 2015-2018 all contributors +# License: AGPL-3.0+ 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();