summaryrefslogtreecommitdiff
path: root/test/etap/010-file-basics.t
diff options
context:
space:
mode:
authorDamien F. Katz <damien@apache.org>2010-03-04 01:09:22 +0000
committerDamien F. Katz <damien@apache.org>2010-03-04 01:09:22 +0000
commit3a3a9c1efab1c9fe4cd5ebb6c80da4005eb0806b (patch)
treef850ff24c113465531aab2bdcdb2f2e70855d00c /test/etap/010-file-basics.t
parent2ea7ab6a8525184ecdbfcee69667e200511b9f9b (diff)
Changed process tree shutdown to be synchronous, to eliminate spurious test failures caused by processes not shutdown fast enough or at the wrong time.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@918805 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/etap/010-file-basics.t')
-rwxr-xr-xtest/etap/010-file-basics.t13
1 files changed, 13 insertions, 0 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