ok(urlComponents.dwUrlPathLength==strlen(TEST_URL2_PATH),".dwUrlPathLength should be %ld, but is %ld\n",(DWORD)strlen(TEST_URL2_PATH),urlComponents.dwUrlPathLength);
ok(urlComponents.dwUrlPathLength==strlen(TEST_URL2_PATH),".dwUrlPathLength should be %d, but is %d\n",(DWORD)strlen(TEST_URL2_PATH),urlComponents.dwUrlPathLength);
ok(!strncmp(urlComponents.lpszUrlPath,TEST_URL2_PATH,strlen(TEST_URL2_PATH)),"lpszUrlPath should be %s but is %s\n",TEST_URL2_PATH,urlComponents.lpszUrlPath);
ok(urlComponents.dwHostNameLength==strlen(TEST_URL2_SERVER),".dwHostNameLength should be %ld, but is %ld\n",(DWORD)strlen(TEST_URL2_SERVER),urlComponents.dwHostNameLength);
ok(urlComponents.dwHostNameLength==strlen(TEST_URL2_SERVER),".dwHostNameLength should be %d, but is %d\n",(DWORD)strlen(TEST_URL2_SERVER),urlComponents.dwHostNameLength);
ok(!strncmp(urlComponents.lpszHostName,TEST_URL2_SERVER,strlen(TEST_URL2_SERVER)),"lpszHostName should be %s but is %s\n",TEST_URL2_SERVER,urlComponents.lpszHostName);
ok(urlComponents.dwExtraInfoLength==strlen(TEST_URL2_EXTRA),".dwExtraInfoLength should be %ld, but is %ld\n",(DWORD)strlen(TEST_URL2_EXTRA),urlComponents.dwExtraInfoLength);
ok(urlComponents.dwExtraInfoLength==strlen(TEST_URL2_EXTRA),".dwExtraInfoLength should be %d, but is %d\n",(DWORD)strlen(TEST_URL2_EXTRA),urlComponents.dwExtraInfoLength);
ok(!strncmp(urlComponents.lpszExtraInfo,TEST_URL2_EXTRA,strlen(TEST_URL2_EXTRA)),"lpszExtraInfo should be %s but is %s\n",TEST_URL2_EXTRA,urlComponents.lpszHostName);
/* 2. When extra info is not split out explicitly and is in url path */
zero_compsA(&urlComponents,0,1,0,0,1,0);
ok(InternetCrackUrlA(TEST_URL2,0,0,&urlComponents),"InternetCrackUrl failed with GLE 0x%lx\n",GetLastError());
ok(urlComponents.dwUrlPathLength==strlen(TEST_URL2_PATHEXTRA),".dwUrlPathLength should be %ld, but is %ld\n",(DWORD)strlen(TEST_URL2_PATHEXTRA),urlComponents.dwUrlPathLength);
ok(InternetCrackUrlA(TEST_URL2,0,0,&urlComponents),"InternetCrackUrl failed with GLE 0x%x\n",GetLastError());
ok(urlComponents.dwUrlPathLength==strlen(TEST_URL2_PATHEXTRA),".dwUrlPathLength should be %d, but is %d\n",(DWORD)strlen(TEST_URL2_PATHEXTRA),urlComponents.dwUrlPathLength);
ok(!strncmp(urlComponents.lpszUrlPath,TEST_URL2_PATHEXTRA,strlen(TEST_URL2_PATHEXTRA)),"lpszUrlPath should be %s but is %s\n",TEST_URL2_PATHEXTRA,urlComponents.lpszUrlPath);
ok(urlComponents.dwHostNameLength==strlen(TEST_URL2_SERVER),".dwHostNameLength should be %ld, but is %ld\n",(DWORD)strlen(TEST_URL2_SERVER),urlComponents.dwHostNameLength);
ok(urlComponents.dwHostNameLength==strlen(TEST_URL2_SERVER),".dwHostNameLength should be %d, but is %d\n",(DWORD)strlen(TEST_URL2_SERVER),urlComponents.dwHostNameLength);
ok(!strncmp(urlComponents.lpszHostName,TEST_URL2_SERVER,strlen(TEST_URL2_SERVER)),"lpszHostName should be %s but is %s\n",TEST_URL2_SERVER,urlComponents.lpszHostName);
ok(urlComponents.nPort==INTERNET_DEFAULT_HTTP_PORT,"urlComponents->nPort should have been 80 instead of %d\n",urlComponents.nPort);
ok(urlComponents.nScheme==INTERNET_SCHEME_HTTP,"urlComponents->nScheme should have been INTERNET_SCHEME_HTTP instead of %d\n",urlComponents.nScheme);
zero_compsA(&urlComponents,1,1,1,1,1,1);
ok(InternetCrackUrlA(TEST_URL,strlen(TEST_URL),0,&urlComponents),"InternetCrackUrl failed with GLE 0x%lx\n",GetLastError());
ok(urlComponents.dwUrlPathLength==strlen(TEST_URL_PATH),".dwUrlPathLength should be %d, but is %ld\n",lstrlenA(TEST_URL_PATH),urlComponents.dwUrlPathLength);
ok(InternetCrackUrlA(TEST_URL,strlen(TEST_URL),0,&urlComponents),"InternetCrackUrl failed with GLE 0x%x\n",GetLastError());
ok(urlComponents.dwUrlPathLength==strlen(TEST_URL_PATH),".dwUrlPathLength should be %d, but is %d\n",lstrlenA(TEST_URL_PATH),urlComponents.dwUrlPathLength);
ok(!strncmp(urlComponents.lpszUrlPath,TEST_URL_PATH,strlen(TEST_URL_PATH)),"lpszUrlPath should be %s but is %s\n",TEST_URL_PATH,urlComponents.lpszUrlPath);
ok(urlComponents.dwHostNameLength==strlen(TEST_URL_HOST),".dwHostNameLength should be %d, but is %ld\n",lstrlenA(TEST_URL_HOST),urlComponents.dwHostNameLength);
ok(urlComponents.dwHostNameLength==strlen(TEST_URL_HOST),".dwHostNameLength should be %d, but is %d\n",lstrlenA(TEST_URL_HOST),urlComponents.dwHostNameLength);
ok(!strncmp(urlComponents.lpszHostName,TEST_URL_HOST,strlen(TEST_URL_HOST)),"lpszHostName should be %s but is %s\n",TEST_URL_HOST,urlComponents.lpszHostName);
ok(urlComponents.nPort==INTERNET_DEFAULT_HTTP_PORT,"urlComponents->nPort should have been 80 instead of %d\n",urlComponents.nPort);
ok(urlComponents.nScheme==INTERNET_SCHEME_HTTP,"urlComponents->nScheme should have been INTERNET_SCHEME_HTTP instead of %d\n",urlComponents.nScheme);
ok(!urlComponents.lpszUserName,".lpszUserName should have been set to NULL\n");
ok(!urlComponents.lpszPassword,".lpszPassword should have been set to NULL\n");
ok(!urlComponents.lpszExtraInfo,".lpszExtraInfo should have been set to NULL\n");
ok(!urlComponents.dwUserNameLength,".dwUserNameLength should be 0, but is %ld\n",urlComponents.dwUserNameLength);
ok(!urlComponents.dwPasswordLength,".dwPasswordLength should be 0, but is %ld\n",urlComponents.dwPasswordLength);
ok(!urlComponents.dwExtraInfoLength,".dwExtraInfoLength should be 0, but is %ld\n",urlComponents.dwExtraInfoLength);
ok(!urlComponents.dwUserNameLength,".dwUserNameLength should be 0, but is %d\n",urlComponents.dwUserNameLength);
ok(!urlComponents.dwPasswordLength,".dwPasswordLength should be 0, but is %d\n",urlComponents.dwPasswordLength);
ok(!urlComponents.dwExtraInfoLength,".dwExtraInfoLength should be 0, but is %d\n",urlComponents.dwExtraInfoLength);