Module: wine Branch: master Commit: 34e88a4a7661e93f2420a82c493548ec7d6ea2de URL: http://source.winehq.org/git/wine.git/?a=commit;h=34e88a4a7661e93f2420a82c49...
Author: Dmitry Timoshkov dmitry@baikal.ru Date: Fri Dec 4 17:15:11 2015 +0800
winhttp/tests: Add a test for data returned by IWinHttpRequest::get_ResponseText().
Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru Signed-off-by: Hans Leidekker hans@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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 );