summaryrefslogtreecommitdiff
path: root/apps/couch/test/etap/011-file-headers.t
diff options
context:
space:
mode:
Diffstat (limited to 'apps/couch/test/etap/011-file-headers.t')
-rwxr-xr-xapps/couch/test/etap/011-file-headers.t9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/couch/test/etap/011-file-headers.t b/apps/couch/test/etap/011-file-headers.t
index 4705f629..764b10df 100755
--- a/apps/couch/test/etap/011-file-headers.t
+++ b/apps/couch/test/etap/011-file-headers.t
@@ -22,7 +22,7 @@ main(_) ->
{S1, S2, S3} = now(),
random:seed(S1, S2, S3),
- etap:plan(17),
+ etap:plan(18),
case (catch test()) of
ok ->
etap:end_tests();
@@ -68,6 +68,13 @@ test() ->
etap:is({ok, Size2}, couch_file:bytes(Fd),
"Rewriting the same second header returns the same second size."),
+ couch_file:write_header(Fd, erlang:make_tuple(5000, <<"CouchDB">>)),
+ etap:is(
+ couch_file:read_header(Fd),
+ {ok, erlang:make_tuple(5000, <<"CouchDB">>)},
+ "Headers larger than the block size can be saved (COUCHDB-1319)"
+ ),
+
ok = couch_file:close(Fd),
% Now for the fun stuff. Try corrupting the second header and see