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

This commit is contained in:
Lei Zhang 2007-11-09 01:24:35 -08:00 committed by Alexandre Julliard
parent a1e554739e
commit 83a4dbaa68
1 changed files with 5 additions and 2 deletions

View File

@ -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);