git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ce72b5
)
Test maxsize parameter to file_load() as used in Samba 3.
author
Jelmer Vernooij
<jelmer@samba.org>
Mon, 13 Oct 2008 14:40:27 +0000
(16:40 +0200)
committer
Jelmer Vernooij
<jelmer@samba.org>
Mon, 13 Oct 2008 14:40:27 +0000
(16:40 +0200)
lib/util/tests/file.c
patch
|
blob
|
history
diff --git
a/lib/util/tests/file.c
b/lib/util/tests/file.c
index 9a303bf8c1bd6ea7c1be95e8bc9090d7b7d19c93..4aff0e9afdee5338c2a7892af4fa1187ea6fd5ca 100644
(file)
--- a/
lib/util/tests/file.c
+++ b/
lib/util/tests/file.c
@@
-49,6
+49,12
@@
static bool test_file_load_save(struct torture_context *tctx)
torture_assert_mem_equal(tctx, data, TEST_DATA, len, "Contents");
+ data = file_load(TEST_FILENAME, &len, 5, mem_ctx);
+
+ torture_assert_int_equal(tctx, len, 5, "Length");
+
+ torture_assert_mem_equal(tctx, data, TEST_DATA, len, "Contents");
+
unlink(TEST_FILENAME);
return true;
}