about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-02-24 08:08:21 +0000
committerEric Wong <e@yhbt.net>2020-02-24 18:30:16 +0000
commit04ad02d739b352514ddfb5cc659bb4a69c4d07e1 (patch)
treee982b62b67d1c8d587f1fd06ece295ae00f733ac /t
parent45e7610b47b038dedf745d0f8c0d7eb987ee8132 (diff)
downloadpublic-inbox-04ad02d739b352514ddfb5cc659bb4a69c4d07e1.tar.gz
Import::remove is a documented interface, and the return
value of the V2Writable work-alike should try to be compatible
with what Import implements.
Diffstat (limited to 't')
-rw-r--r--t/v2writable.t7
1 files changed, 5 insertions, 2 deletions
diff --git a/t/v2writable.t b/t/v2writable.t
index 77bd68d4..cdcfe4d0 100644
--- a/t/v2writable.t
+++ b/t/v2writable.t
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 use Test::More;
 use PublicInbox::MIME;
-use PublicInbox::ContentId qw(content_digest);
+use PublicInbox::ContentId qw(content_digest content_id);
 use PublicInbox::TestCommon;
 use Cwd qw(abs_path);
 require_git(2.6);
@@ -206,7 +206,10 @@ EOF
         my $before = $git0->qx(@log, qw(--pretty=raw --raw -r));
         $im = PublicInbox::V2Writable->new($ibx, {nproc => 2});
         is($im->{shards}, 1, 'detected single shard from previous');
-        my $smsg = $im->remove($mime, 'test removal');
+        my ($mark, $rm_mime, $smsg) = $im->remove($mime, 'test removal');
+        is(content_id($rm_mime), content_id($mime),
+                        'removed object returned matches');
+        ok(defined($mark), 'mark set');
         $im->done;
         my @after = $git0->qx(@log, qw(--pretty=oneline));
         my $tip = shift @after;