From 0e9f46d0749d7309ca42d7f5691a3ea64cc8c230 Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Tue, 28 Jan 2014 13:25:23 +0100 Subject: [PATCH] winhttp/tests: Fix a test that fails on Windows. --- dlls/winhttp/tests/winhttp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c index 255eb095465..74ec60dcbe6 100644 --- a/dlls/winhttp/tests/winhttp.c +++ b/dlls/winhttp/tests/winhttp.c @@ -292,7 +292,7 @@ static void test_SendRequest (void) static const WCHAR test_file[] = {'/','p','o','s','t','t','e','s','t','.','p','h','p',0}; static const WCHAR test_verb[] = {'P','O','S','T',0}; static CHAR post_data[] = "mode=Test"; - static const char test_post[] = "mode => Test\\0\n"; + static const char test_post[] = "mode => Test\0\n"; header_len = -1L; total_len = optional_len = sizeof(post_data); @@ -349,8 +349,8 @@ static void test_SendRequest (void) ret = WinHttpReadData(request, buffer, sizeof(buffer) - 1, &bytes_rw); ok(ret == TRUE, "WinHttpReadData failed: %u.\n", GetLastError()); - ok(bytes_rw == strlen(test_post), "Read %u bytes instead of %d.\n", bytes_rw, lstrlenA(test_post)); - ok(strncmp(buffer, test_post, bytes_rw) == 0, "Data read did not match, got '%s'.\n", buffer); + ok(bytes_rw == sizeof(test_post) - 1, "Read %u bytes\n", bytes_rw); + ok(!memcmp(buffer, test_post, sizeof(test_post) - 1), "Data read did not match.\n"); ret = WinHttpCloseHandle(request); ok(ret == TRUE, "WinHttpCloseHandle failed on closing request, got %d.\n", ret); -- 2.11.4.GIT