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

Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Sven Baars 2019-10-24 20:21:22 +02:00 committed by Alexandre Julliard
parent 14fd1ccdc6
commit 237d563627
1 changed files with 7 additions and 7 deletions

View File

@ -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);