From 4653d05fef15944e550fafe7c31961dbf007fd95 Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Sun, 6 Dec 2009 03:18:11 +0200 Subject: tdr-test: Fix 'push_charset' test 4 bytes of 'bloe' string are pushed, so we should check only for the first 4 caracters Signed-off-by: Andrew Tridgell --- lib/tdr/testsuite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/tdr/testsuite.c b/lib/tdr/testsuite.c index 36bb164a9a..ca76b5291e 100644 --- a/lib/tdr/testsuite.c +++ b/lib/tdr/testsuite.c @@ -154,7 +154,7 @@ static bool test_push_charset(struct torture_context *tctx) torture_assert_ntstatus_ok(tctx, tdr_push_charset(tdr, &l, 4, 1, CH_UTF8), "push failed"); torture_assert_int_equal(tctx, 4, tdr->data.length, "offset invalid"); - torture_assert(tctx, strcmp("bloe", (const char *)tdr->data.data) == 0, "right string push"); + torture_assert(tctx, strncmp("bloe", (const char *)tdr->data.data, 4) == 0, "right string push"); torture_assert_ntstatus_ok(tctx, tdr_push_charset(tdr, &l, -1, 1, CH_UTF8), "push failed"); -- cgit