WININET: small fix for InternetCreateUrlA [try #2]
Saulius Krasuckas
saulius2 at ar.fi.lt
Sun Nov 13 05:51:40 CST 2005
* Initial patch.
* Synced to CVS.
Log message:
Saulius Krasuckas <saulius.krasuckas at ieee.org>
- Fix a test for InternetCreateUrlA as no Windows platform sets
last error here.
- Make InternetCreateUrlA pass the test.
Index: dlls/wininet/tests/http.c
===================================================================
RCS file: /home/wine/wine/dlls/wininet/tests/http.c,v
retrieving revision 1.29
diff -p -u -r1.29 http.c
--- dlls/wininet/tests/http.c 31 Oct 2005 14:06:35 -0000 1.29
+++ dlls/wininet/tests/http.c 13 Nov 2005 10:54:43 -0000
@@ -784,8 +784,8 @@ static void InternetCreateUrlA_test()
len = 42;
ret = InternetCreateUrlA(&urlComp, 0, szUrl, &len);
ok(ret, "Expected success\n");
- ok(GetLastError() == ERROR_ALREADY_EXISTS,
- "Expected ERROR_ALREADYEXISTS, got %ld\n", GetLastError());
+ ok(GetLastError() == 0xdeadbeef,
+ "Expected 0xdeadbeef, got %ld\n", GetLastError());
ok(len == 32, "Expected len 32, got %ld\n", len);
ok(!strcmp(szUrl, CREATE_URL4), "Expected %s, got %s\n", CREATE_URL3, szUrl);
Index: dlls/wininet/internet.c
===================================================================
RCS file: /home/wine/wine/dlls/wininet/internet.c,v
retrieving revision 1.138
diff -p -u -r1.138 internet.c
--- dlls/wininet/internet.c 10 Nov 2005 12:14:57 -0000 1.138
+++ dlls/wininet/internet.c 13 Nov 2005 10:54:52 -0000
@@ -3473,8 +3473,6 @@ static BOOL calc_url_length(LPURL_COMPON
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
}
- else
- SetLastError(ERROR_ALREADY_EXISTS);
}
if (lpUrlComponents->lpszPassword)
More information about the wine-patches
mailing list