Commit 237d5636 authored by Sven Baars's avatar Sven Baars Committed by Alexandre Julliard

wininet/tests: Skip some FTP tests when no connection can be made.

parent 14fd1ccd
......@@ -63,7 +63,7 @@ static void test_connect(HINTERNET hInternet)
HINTERNET hFtp;
/* Try a few username/password combinations:
* anonymous : NULL
* anonymous : IEUser@
* NULL : IEUser@
* NULL : NULL
* "" : IEUser@
......@@ -72,14 +72,14 @@ static void test_connect(HINTERNET hInternet)
SetLastError(0xdeadbeef);
hFtp = InternetConnectA(hInternet, "ftp.winehq.org", INTERNET_DEFAULT_FTP_PORT, "anonymous", "IEUser@", INTERNET_SERVICE_FTP, INTERNET_FLAG_PASSIVE, 0);
if (hFtp) /* some servers accept an empty password */
if (!hFtp)
{
ok ( GetLastError() == ERROR_SUCCESS, "ERROR_SUCCESS, got %d\n", GetLastError());
InternetCloseHandle(hFtp);
skip("No ftp connection could be made to ftp.winehq.org %u\n", GetLastError());
return;
}
else
ok ( GetLastError() == ERROR_INTERNET_LOGIN_FAILURE,
"Expected ERROR_INTERNET_LOGIN_FAILURE, got %d\n", GetLastError());
ok(GetLastError() == ERROR_SUCCESS,
"Expected ERROR_SUCCESS, got %d\n", GetLastError());
InternetCloseHandle(hFtp);
SetLastError(0xdeadbeef);
hFtp = InternetConnectA(hInternet, "ftp.winehq.org", INTERNET_DEFAULT_FTP_PORT, NULL, "IEUser@", INTERNET_SERVICE_FTP, INTERNET_FLAG_PASSIVE, 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