winhttp/test: Fix a test that fails on Windows.
Hans Leidekker
hans at codeweavers.com
Tue Jan 28 06:25:23 CST 2014
---
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 255eb09..a86a668 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 instead of %u.\n", bytes_rw, sizeof(test_post) - 1);
+ 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);
--
1.8.5.3
More information about the wine-patches
mailing list