From 2e5d47e4c02757c027461149b3e1568d713252b1 Mon Sep 17 00:00:00 2001 From: "Eric Wong (Contractor, The Linux Foundation)" Date: Wed, 21 Mar 2018 08:29:25 +0000 Subject: msgmap: add tmp_clone to create an anonymous copy This will be used to keep track of Message-ID <-> NNTP Article numbers to prevent article number reuse when reindexing. --- t/msgmap.t | 4 ++++ 1 file changed, 4 insertions(+) (limited to 't') diff --git a/t/msgmap.t b/t/msgmap.t index bc22137d..dce98f46 100644 --- a/t/msgmap.t +++ b/t/msgmap.t @@ -65,4 +65,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(); -- cgit v1.2.3-24-ge0c7