[3/4] winhttp/tests: Add a test for data returned by IWinHttpRequest::get_ResponseText().

Dmitry Timoshkov dmitry at baikal.ru
Fri Dec 4 03:15:11 CST 2015


Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
---
 dlls/winhttp/tests/winhttp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c
index 1dbfe08..bc36fa2 100644
--- a/dlls/winhttp/tests/winhttp.c
+++ b/dlls/winhttp/tests/winhttp.c
@@ -3051,6 +3051,7 @@ static void test_credentials(void)
 
 static void test_IWinHttpRequest(void)
 {
+    static const WCHAR data_start[] = {'<','!','D','O','C','T','Y','P','E',' ','h','t','m','l',' ','P','U','B','L','I','C'};
     static const WCHAR usernameW[] = {'u','s','e','r','n','a','m','e',0};
     static const WCHAR passwordW[] = {'p','a','s','s','w','o','r','d',0};
     static const WCHAR url1W[] = {'h','t','t','p',':','/','/','t','e','s','t','.','w','i','n','e','h','q','.','o','r','g',0};
@@ -3358,6 +3359,7 @@ static void test_IWinHttpRequest(void)
 
     hr = IWinHttpRequest_get_ResponseText( req, &response );
     ok( hr == S_OK, "got %08x\n", hr );
+    ok( !memcmp(response, data_start, sizeof(data_start)), "got %s\n", wine_dbgstr_wn(response, 32) );
     SysFreeString( response );
 
     hr = IWinHttpRequest_get_Status( req, NULL );
-- 
2.6.3




More information about the wine-patches mailing list