summaryrefslogtreecommitdiff
path: root/test/etap
diff options
context:
space:
mode:
Diffstat (limited to 'test/etap')
-rwxr-xr-xtest/etap/010-file-basics.t13
-rwxr-xr-xtest/etap/040-util.t23
2 files changed, 13 insertions, 23 deletions
diff --git a/test/etap/010-file-basics.t b/test/etap/010-file-basics.t
index 09b2f2b1..595d87e9 100755
--- a/test/etap/010-file-basics.t
+++ b/test/etap/010-file-basics.t
@@ -67,6 +67,19 @@ test() ->
{ok, BinPos} = couch_file:append_binary(Fd, <<131,100,0,3,102,111,111>>),
etap:is({ok, foo}, couch_file:pread_term(Fd, BinPos),
"Reading a term from a written binary term representation succeeds."),
+
+ BigBin = list_to_binary(lists:duplicate(100000, 0)),
+ {ok, BigBinPos} = couch_file:append_binary(Fd, BigBin),
+ etap:is({ok, BigBin}, couch_file:pread_binary(Fd, BigBinPos),
+ "Reading a large term from a written representation succeeds."),
+
+ ok = couch_file:write_header(Fd, hello),
+ etap:is({ok, hello}, couch_file:read_header(Fd),
+ "Reading a header succeeds."),
+
+ {ok, BigBinPos2} = couch_file:append_binary(Fd, BigBin),
+ etap:is({ok, BigBin}, couch_file:pread_binary(Fd, BigBinPos2),
+ "Reading a large term from a written representation succeeds 2."),
% append_binary == append_iolist?
% Possible bug in pread_iolist or iolist() -> append_binary
diff --git a/test/etap/040-util.t b/test/etap/040-util.t
index 4500d38a..9c8f3d5a 100755
--- a/test/etap/040-util.t
+++ b/test/etap/040-util.t
@@ -35,29 +35,6 @@ 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."),