summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-08-11 17:08:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:01:38 -0500
commita43b026ef0e9c1ffd24130c35275f02326bfc9c7 (patch)
tree8e5df8add310843ba482434d2246041ba0149077 /source4/lib
parent1317d8e6942500d4caef5d7856b663d40d5043a7 (diff)
downloadsamba-a43b026ef0e9c1ffd24130c35275f02326bfc9c7.tar.gz
samba-a43b026ef0e9c1ffd24130c35275f02326bfc9c7.tar.bz2
samba-a43b026ef0e9c1ffd24130c35275f02326bfc9c7.zip
r24333: Add convenience function for checking the contents of a file in tests.
(This used to be commit 4e304101241ea7bcb9111b757bb51b16665d492d)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/util/tests/file.c3
1 files changed, 3 insertions, 0 deletions
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");