summaryrefslogtreecommitdiff
path: root/test/etap/010-file-basics.t
diff options
context:
space:
mode:
authorNoah Slater <nslater@apache.org>2009-07-06 00:33:50 +0000
committerNoah Slater <nslater@apache.org>2009-07-06 00:33:50 +0000
commit282b96ddd9a84b740788c2358ec0f5fedafb7cc6 (patch)
treefb48e605ceb8079d0195d3b1ec0eca7110fa7ef2 /test/etap/010-file-basics.t
parentb5cc085d3bc6316063f14adedf20632ee904875d (diff)
trimmed trailing whitespace
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@791350 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/etap/010-file-basics.t')
-rwxr-xr-xtest/etap/010-file-basics.t14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/etap/010-file-basics.t b/test/etap/010-file-basics.t
index 9033317f..055c9780 100755
--- a/test/etap/010-file-basics.t
+++ b/test/etap/010-file-basics.t
@@ -15,7 +15,7 @@ main(_) ->
etap:bail()
end,
ok.
-
+
test() ->
etap:is({error, enoent}, couch_file:open("not a real file"),
"Opening a non-existant file should return an enoent error."),
@@ -29,7 +29,7 @@ test() ->
{ok, Fd} = couch_file:open(filename() ++ ".0", [create, overwrite]),
etap:ok(is_pid(Fd),
"Returned file descriptor is a Pid"),
-
+
etap:is({ok, 0}, couch_file:bytes(Fd),
"Newly created files have 0 bytes."),
@@ -39,16 +39,16 @@ test() ->
{ok, Size} = couch_file:bytes(Fd),
etap:is_greater(Size, 0,
"Writing a term increased the file size."),
-
+
etap:is({ok, Size}, couch_file:append_binary(Fd, <<"fancy!">>),
"Appending a binary returns the current file size."),
-
+
etap:is({ok, foo}, couch_file:pread_term(Fd, 0),
"Reading the first term returns what we wrote: foo"),
-
+
etap:is({ok, <<"fancy!">>}, couch_file:pread_binary(Fd, Size),
"Reading back the binary returns what we wrote: <<\"fancy\">>."),
-
+
etap:is({ok, <<131, 100, 0, 3, 102, 111, 111>>},
couch_file:pread_binary(Fd, 0),
"Reading a binary at a term position returns the term as binary."
@@ -75,7 +75,7 @@ test() ->
% "Reading data that was truncated fails.")
etap:skip(fun() -> ok end,
"No idea how to test reading beyond EOF"),
-
+
etap:is({ok, foo}, couch_file:pread_term(Fd, 0),
"Truncating does not affect data located before the truncation mark."),