Commit b20694e7 authored by Alexandre Julliard's avatar Alexandre Julliard

wininet/tests: Anonymous FTP can succeed without a password.

parent f4a4a1c0
...@@ -77,9 +77,14 @@ static void test_connect(void) ...@@ -77,9 +77,14 @@ static void test_connect(void)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
hFtp = InternetConnect(hInternet, "ftp.winehq.org", INTERNET_DEFAULT_FTP_PORT, "anonymous", NULL, INTERNET_SERVICE_FTP, 0, 0); hFtp = InternetConnect(hInternet, "ftp.winehq.org", INTERNET_DEFAULT_FTP_PORT, "anonymous", NULL, INTERNET_SERVICE_FTP, 0, 0);
ok ( hFtp == NULL, "Expected InternetConnect to fail\n"); if (hFtp) /* some servers accept an empty password */
ok ( GetLastError() == ERROR_INTERNET_LOGIN_FAILURE, {
"Expected ERROR_INTERNET_LOGIN_FAILURE, got %d\n", GetLastError()); ok ( GetLastError() == ERROR_SUCCESS, "ERROR_SUCCESS, got %d\n", GetLastError());
InternetCloseHandle(hFtp);
}
else
ok ( GetLastError() == ERROR_INTERNET_LOGIN_FAILURE,
"Expected ERROR_INTERNET_LOGIN_FAILURE, got %d\n", GetLastError());
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
hFtp = InternetConnect(hInternet, "ftp.winehq.org", INTERNET_DEFAULT_FTP_PORT, NULL, "IEUser@", INTERNET_SERVICE_FTP, 0, 0); hFtp = InternetConnect(hInternet, "ftp.winehq.org", INTERNET_DEFAULT_FTP_PORT, NULL, "IEUser@", INTERNET_SERVICE_FTP, 0, 0);
......
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