From 04ad02d739b352514ddfb5cc659bb4a69c4d07e1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 24 Feb 2020 08:08:21 +0000 Subject: v2writable: make remove return-compatible w/ Import::remove Import::remove is a documented interface, and the return value of the V2Writable work-alike should try to be compatible with what Import implements. --- t/v2writable.t | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 't') 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; -- cgit v1.2.3-24-ge0c7