about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-09-19 12:50:20 +0000
committerEric Wong <e@80x24.org>2021-09-19 19:52:43 +0000
commit6082492b14ee2a24b0131ce0a99b26ee316a4d88 (patch)
tree8a69104e1f7732336536720df232ea9fe08e028a /t
parented8cffcbe04d29a047fb3eb655f50b40e2eb5462 (diff)
downloadpublic-inbox-6082492b14ee2a24b0131ce0a99b26ee316a4d88.tar.gz
This brings the wq_* SOCK_SEQPACKET API functionality
on par with the ipc_do (pipe-based) API.
Diffstat (limited to 't')
-rw-r--r--t/ipc.t6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/ipc.t b/t/ipc.t
index 7983fdc0..202b1cc6 100644
--- a/t/ipc.t
+++ b/t/ipc.t
@@ -161,6 +161,12 @@ SKIP: {
                 is(waitpid($pid, 0), $pid, 'waitpid complete');
                 is($?, 0, 'child wq producer exited');
         }
+        my @ary = $ipc->wq_do('test_array');
+        is_deeply(\@ary, [ qw(test array) ], 'wq_do wantarray');
+        is(my $s = $ipc->wq_do('test_scalar'), 'scalar', 'defined wantarray');
+        my $exp = bless ['blessed'], 'PublicInbox::WTF';
+        my $ret = eval { $ipc->wq_do('test_die', $exp) };
+        is_deeply($@, $exp, 'die with blessed ref');
 }
 
 $ipc->wq_close;