summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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;
}