Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
bbf74ea2
Commit
bbf74ea2
authored
Oct 18, 2019
by
Hans Leidekker
Committed by
Alexandre Julliard
Oct 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet/tests: Fix FTP test failures.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f449c361
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
+17
-16
ftp.c
dlls/wininet/tests/ftp.c
+17
-16
No files found.
dlls/wininet/tests/ftp.c
View file @
bbf74ea2
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment