Commit 83a4dbaa authored by Lei Zhang's avatar Lei Zhang Committed by Alexandre Julliard

wininet: Skip strcmp() in a test if the returned value/len is wrong.

parent a1e55473
......@@ -142,9 +142,12 @@ static void test_InternetQueryOptionA(void)
buffer=HeapAlloc(GetProcessHeap(),0,len);
retval=InternetQueryOptionA(hinet,INTERNET_OPTION_USER_AGENT,buffer,&len);
err=GetLastError();
todo_wine ok(!strcmp(useragent,buffer),"Got wrong user agent string %s instead of %s\n",buffer,useragent);
todo_wine ok(len == strlen(useragent),"Got wrong user agent length %d instead of %d\n",len,lstrlenA(useragent));
todo_wine ok(retval == 1,"Got wrong return value %d\n",retval);
if (retval)
{
todo_wine ok(!strcmp(useragent,buffer),"Got wrong user agent string %s instead of %s\n",buffer,useragent);
todo_wine ok(len == strlen(useragent),"Got wrong user agent length %d instead of %d\n",len,lstrlenA(useragent));
}
ok(err == 0xdeadbeef, "Got wrong error code %d\n",err);
HeapFree(GetProcessHeap(),0,buffer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment