summaryrefslogtreecommitdiff
path: root/test/etap/040-util.t
diff options
context:
space:
mode:
Diffstat (limited to 'test/etap/040-util.t')
-rwxr-xr-xtest/etap/040-util.t23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/etap/040-util.t b/test/etap/040-util.t
index 9c8f3d5a..4500d38a 100755
--- a/test/etap/040-util.t
+++ b/test/etap/040-util.t
@@ -35,6 +35,29 @@ test() ->
etap:is(foobarbaz, couch_util:to_existing_atom("foobarbaz"),
"A list of atoms is one munged atom."),
+ % terminate_linked
+ Self = self(),
+
+ spawn(fun() ->
+ SecondSelf = self(),
+ ChildPid = spawn_link(fun() ->
+ SecondSelf ! {child, started},
+ receive shutdown -> ok end
+ end),
+ PidUp = receive
+ {child, started} -> ok
+ after 1000 ->
+ {error, timeout}
+ end,
+ etap:is(ok, PidUp, "Started a linked process."),
+ couch_util:terminate_linked(normal),
+ Self ! {pid, ChildPid}
+ end),
+ receive
+ {pid, Pid} ->
+ etap:ok(not is_process_alive(Pid), "Linked process was killed.")
+ end,
+
% implode
etap:is([1, 38, 2, 38, 3], couch_util:implode([1,2,3],"&"),
"use & as separator in list."),