X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fipc.t;h=0efc53949543c5afd478bbbe152f0242c0a7c880;hb=af0b0fb7a454470a32c452119d0392e0dedb3fe1;hp=f3715e2c879c84a2bca8753c5ae543715c7a7dc8;hpb=f7ce917c8dfba330586791ceb4bdd06bc61c0547;p=public-inbox.git
diff --git a/t/ipc.t b/t/ipc.t
index f3715e2c..0efc5394 100644
--- a/t/ipc.t
+++ b/t/ipc.t
@@ -1,5 +1,5 @@
#!perl -w
-# Copyright (C) 2020 all contributors
+# Copyright (C) 2020-2021 all contributors
# License: AGPL-3.0+
use strict;
use v5.10.1;
@@ -45,6 +45,19 @@ my $test = sub {
is((values %lines)[0], 2, '2 hits on same line number');
is($err, $exp, "$x die matches");
is($ret, undef, "$x die did not return");
+
+ eval { $ipc->test_die(['arrayref']) };
+ $exp = $@;
+ $ret = eval { $ipc->ipc_do('test_die', ['arrayref']) };
+ $err = $@;
+ is_deeply($err, $exp, 'die with unblessed ref');
+ is(ref($err), 'ARRAY', 'got an array ref');
+
+ $exp = bless ['blessed'], 'PublicInbox::WTF';
+ $ret = eval { $ipc->ipc_do('test_die', $exp) };
+ $err = $@;
+ is_deeply($err, $exp, 'die with blessed ref');
+ is(ref($err), 'PublicInbox::WTF', 'got blessed ref');
};
$test->('local');