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

This commit is contained in:
Alexandre Julliard 2007-09-14 16:59:06 +02:00
parent f4a4a1c054
commit b20694e732
1 changed files with 8 additions and 3 deletions

View File

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