From a43b026ef0e9c1ffd24130c35275f02326bfc9c7 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 11 Aug 2007 17:08:22 +0000 Subject: r24333: Add convenience function for checking the contents of a file in tests. (This used to be commit 4e304101241ea7bcb9111b757bb51b16665d492d) --- source4/lib/util/tests/file.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source4/lib') diff --git a/source4/lib/util/tests/file.c b/source4/lib/util/tests/file.c index 66a3b81dca..0fe117a300 100644 --- a/source4/lib/util/tests/file.c +++ b/source4/lib/util/tests/file.c @@ -39,6 +39,9 @@ static bool test_file_load_save(struct torture_context *tctx) torture_assert(tctx, file_save(TEST_FILENAME, TEST_DATA, strlen(TEST_DATA)), "saving file"); + torture_assert_file_contains_text(tctx, TEST_FILENAME, TEST_DATA, + "file contents"); + data = file_load(TEST_FILENAME, &len, mem_ctx); torture_assert(tctx, data, "loading file"); -- cgit