diff options
author | Eric Wong <e@80x24.org> | 2020-12-31 13:51:48 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-01-01 05:00:40 +0000 |
commit | 2b5d41f3a1b55ae513e9d5510d830074234fda37 (patch) | |
tree | ee59e4bb8251c53a89c4c4fc4ffb32f7defc25e4 /t | |
parent | 71484e7281f608bf21a9b9ded043b26e55660529 (diff) | |
download | public-inbox-2b5d41f3a1b55ae513e9d5510d830074234fda37.tar.gz |
We'll probably start using references as exceptions in some places for more exact matching.
Diffstat (limited to 't')
-rw-r--r-- | t/ipc.t | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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'); |