Commit bbf74ea2 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

wininet/tests: Fix FTP test failures.

parent f449c361
...@@ -71,7 +71,7 @@ static void test_connect(HINTERNET hInternet) ...@@ -71,7 +71,7 @@ static void test_connect(HINTERNET hInternet)
*/ */
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
hFtp = InternetConnectA(hInternet, "ftp.winehq.org", INTERNET_DEFAULT_FTP_PORT, "anonymous", NULL, 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) /* some servers accept an empty password */
{ {
ok ( GetLastError() == ERROR_SUCCESS, "ERROR_SUCCESS, got %d\n", GetLastError()); ok ( GetLastError() == ERROR_SUCCESS, "ERROR_SUCCESS, got %d\n", GetLastError());
...@@ -701,7 +701,7 @@ static void test_renamefile(HINTERNET hFtp, HINTERNET hConnect) ...@@ -701,7 +701,7 @@ static void test_renamefile(HINTERNET hFtp, HINTERNET hConnect)
"Expected ERROR_INTERNET_INCORRECT_HANDLE_TYPE, got %d\n", GetLastError()); "Expected ERROR_INTERNET_INCORRECT_HANDLE_TYPE, got %d\n", GetLastError());
} }
static void test_command(HINTERNET hFtp, HINTERNET hConnect) static void test_command(HINTERNET hFtp)
{ {
BOOL ret; BOOL ret;
DWORD error; DWORD error;
...@@ -716,17 +716,18 @@ static void test_command(HINTERNET hFtp, HINTERNET hConnect) ...@@ -716,17 +716,18 @@ static void test_command(HINTERNET hFtp, HINTERNET hConnect)
{ {
{ FALSE, ERROR_INVALID_PARAMETER, NULL }, { FALSE, ERROR_INVALID_PARAMETER, NULL },
{ FALSE, ERROR_INVALID_PARAMETER, "" }, { FALSE, ERROR_INVALID_PARAMETER, "" },
{ FALSE, ERROR_INTERNET_EXTENDED_ERROR, "HELO" }, { FALSE, ERROR_INTERNET_EXTENDED_ERROR, "invalid" },
{ FALSE, ERROR_INTERNET_EXTENDED_ERROR, "SIZE " }, { FALSE, ERROR_INTERNET_EXTENDED_ERROR, "size" },
{ FALSE, ERROR_INTERNET_EXTENDED_ERROR, " SIZE" }, { TRUE, ERROR_SUCCESS, "type i" },
{ FALSE, ERROR_INTERNET_EXTENDED_ERROR, "SIZE " }, { FALSE, ERROR_INTERNET_EXTENDED_ERROR, "size " },
{ FALSE, ERROR_INTERNET_EXTENDED_ERROR, "SIZE /welcome.msg /welcome.msg" }, { FALSE, ERROR_INTERNET_EXTENDED_ERROR, " size" },
{ FALSE, ERROR_INTERNET_EXTENDED_ERROR, "SIZE /welcome.msg" }, { FALSE, ERROR_INTERNET_EXTENDED_ERROR, "size " },
{ FALSE, ERROR_INTERNET_EXTENDED_ERROR, "SIZE /welcome.msg " }, { FALSE, ERROR_INTERNET_EXTENDED_ERROR, "size welcome.msg welcome.msg" },
{ TRUE, ERROR_SUCCESS, "SIZE\t/welcome.msg" }, { FALSE, ERROR_INTERNET_EXTENDED_ERROR, "size welcome.msg" },
{ TRUE, ERROR_SUCCESS, "SIZE /welcome.msg" }, { FALSE, ERROR_INTERNET_EXTENDED_ERROR, "size welcome.msg " },
{ FALSE, ERROR_INTERNET_EXTENDED_ERROR, "PWD /welcome.msg" }, { TRUE, ERROR_SUCCESS, "size welcome.msg" },
{ TRUE, ERROR_SUCCESS, "PWD" } { FALSE, ERROR_INTERNET_EXTENDED_ERROR, "pwd welcome.msg" },
{ TRUE, ERROR_SUCCESS, "pwd" }
}; };
if (!pFtpCommandA) if (!pFtpCommandA)
...@@ -964,7 +965,7 @@ static void test_status_callbacks(HINTERNET hInternet) ...@@ -964,7 +965,7 @@ static void test_status_callbacks(HINTERNET hInternet)
cb = pInternetSetStatusCallbackA(hInternet, status_callback); cb = pInternetSetStatusCallbackA(hInternet, status_callback);
ok(cb == NULL, "expected NULL got %p\n", cb); ok(cb == NULL, "expected NULL got %p\n", cb);
hFtp = InternetConnectA(hInternet, "ftp.winehq.org", INTERNET_DEFAULT_FTP_PORT, "anonymous", NULL, hFtp = InternetConnectA(hInternet, "ftp.winehq.org", INTERNET_DEFAULT_FTP_PORT, "anonymous", "IEUser@",
INTERNET_SERVICE_FTP, INTERNET_FLAG_PASSIVE, 1); INTERNET_SERVICE_FTP, INTERNET_FLAG_PASSIVE, 1);
if (!hFtp) if (!hFtp)
{ {
...@@ -998,7 +999,7 @@ START_TEST(ftp) ...@@ -998,7 +999,7 @@ START_TEST(ftp)
hInternet = InternetOpenA("winetest", 0, NULL, NULL, 0); hInternet = InternetOpenA("winetest", 0, NULL, NULL, 0);
ok(hInternet != NULL, "InternetOpen failed: %u\n", GetLastError()); ok(hInternet != NULL, "InternetOpen failed: %u\n", GetLastError());
hFtp = InternetConnectA(hInternet, "ftp.winehq.org", INTERNET_DEFAULT_FTP_PORT, "anonymous", NULL, 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) if (!hFtp)
{ {
InternetCloseHandle(hInternet); InternetCloseHandle(hInternet);
...@@ -1031,7 +1032,7 @@ START_TEST(ftp) ...@@ -1031,7 +1032,7 @@ START_TEST(ftp)
test_putfile(hFtp, hHttp); test_putfile(hFtp, hHttp);
test_removedir(hFtp, hHttp); test_removedir(hFtp, hHttp);
test_renamefile(hFtp, hHttp); test_renamefile(hFtp, hHttp);
test_command(hFtp, hHttp); test_command(hFtp);
test_find_first_file(hFtp, hHttp); test_find_first_file(hFtp, hHttp);
test_get_current_dir(hFtp, hHttp); test_get_current_dir(hFtp, hHttp);
test_status_callbacks(hInternet); test_status_callbacks(hInternet);
......
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