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