From a6823087e5aa9699a42c31df16323885c70d1b4d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 11 Jan 2019 00:59:51 +0000 Subject: v2writable: ->purge returns undef on no-op And doesn't try to access undef as an array ref. --- t/v2writable.t | 3 +++ 1 file changed, 3 insertions(+) (limited to 't') diff --git a/t/v2writable.t b/t/v2writable.t index ec9f56d9..f1714175 100644 --- a/t/v2writable.t +++ b/t/v2writable.t @@ -247,6 +247,9 @@ EOF ok(my $cmts = $im->purge($mime), 'purged message'); like($cmts->[0], qr/\A[a-f0-9]{40}\z/, 'purge returned current commit'); $im->done; + + # again + is($im->purge($mime), undef, 'no-op returns undef'); } { -- cgit v1.2.3-24-ge0c7