summaryrefslogtreecommitdiff
path: root/lib/util
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-13 16:40:27 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-13 16:40:27 +0200
commit65d5b1e7b494f94cf1ffef04ab74a68967789d89 (patch)
tree0762022be3261cea95014b6caf8c547305ca42b7 /lib/util
parent2ce72b5a69e3cf306277460a6d87754bf71c024b (diff)
downloadsamba-65d5b1e7b494f94cf1ffef04ab74a68967789d89.tar.gz
samba-65d5b1e7b494f94cf1ffef04ab74a68967789d89.tar.bz2
samba-65d5b1e7b494f94cf1ffef04ab74a68967789d89.zip
Test maxsize parameter to file_load() as used in Samba 3.
Diffstat (limited to 'lib/util')
-rw-r--r--lib/util/tests/file.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/util/tests/file.c b/lib/util/tests/file.c
index 9a303bf8c1..4aff0e9afd 100644
--- 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;
}