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
89bdd639
Commit
89bdd639
authored
Mar 01, 2008
by
Francois Gouget
Committed by
Alexandre Julliard
Mar 03, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet/tests: FtpCommandA() is not available on Win9x. So load it dynamically and skip some tests.
parent
dd50ac4e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
ftp.c
dlls/wininet/tests/ftp.c
+22
-2
No files found.
dlls/wininet/tests/ftp.c
View file @
89bdd639
...
...
@@ -42,6 +42,10 @@
#include "wine/test.h"
static
BOOL
(
WINAPI
*
pFtpCommandA
)(
HINTERNET
,
BOOL
,
DWORD
,
LPCSTR
,
DWORD_PTR
,
HINTERNET
*
);
static
void
test_getfile_no_open
(
void
)
{
BOOL
bRet
;
...
...
@@ -680,10 +684,16 @@ static void test_command(HINTERNET hFtp, HINTERNET hConnect)
{
TRUE
,
ERROR_SUCCESS
,
"PWD
\r\n
"
}
};
if
(
!
pFtpCommandA
)
{
skip
(
"FtpCommandA() is not available. Skipping the Ftp command tests
\n
"
);
return
;
}
for
(
i
=
0
;
i
<
sizeof
(
command_test
)
/
sizeof
(
command_test
[
0
]);
i
++
)
{
SetLastError
(
0xdeadbeef
);
ret
=
FtpCommandA
(
hFtp
,
FALSE
,
FTP_TRANSFER_TYPE_ASCII
,
command_test
[
i
].
cmd
,
0
,
NULL
);
ret
=
p
FtpCommandA
(
hFtp
,
FALSE
,
FTP_TRANSFER_TYPE_ASCII
,
command_test
[
i
].
cmd
,
0
,
NULL
);
error
=
GetLastError
();
ok
(
ret
==
command_test
[
i
].
ret
,
"%d: expected FtpCommandA to %s
\n
"
,
i
,
command_test
[
i
].
ret
?
"succeed"
:
"fail"
);
...
...
@@ -697,8 +707,14 @@ static void test_get_current_dir(HINTERNET hFtp, HINTERNET hConnect)
DWORD
dwCurrentDirectoryLen
=
MAX_PATH
;
CHAR
lpszCurrentDirectory
[
MAX_PATH
];
if
(
!
pFtpCommandA
)
{
skip
(
"FtpCommandA() is not available. Skipping the Ftp get_current_dir tests
\n
"
);
return
;
}
/* change directories to get a more interesting pwd */
bRet
=
FtpCommandA
(
hFtp
,
FALSE
,
FTP_TRANSFER_TYPE_ASCII
,
"CWD pub/"
,
0
,
NULL
);
bRet
=
p
FtpCommandA
(
hFtp
,
FALSE
,
FTP_TRANSFER_TYPE_ASCII
,
"CWD pub/"
,
0
,
NULL
);
if
(
bRet
==
FALSE
)
{
skip
(
"Failed to change directories in test_get_current_dir(HINTERNET hFtp).
\n
"
);
...
...
@@ -771,8 +787,12 @@ static void test_get_current_dir(HINTERNET hFtp, HINTERNET hConnect)
START_TEST
(
ftp
)
{
HMODULE
hWininet
;
HANDLE
hInternet
,
hFtp
,
hHttp
;
hWininet
=
GetModuleHandleA
(
"wininet.dll"
);
pFtpCommandA
=
(
void
*
)
GetProcAddress
(
hWininet
,
"FtpCommandA"
);
SetLastError
(
0xdeadbeef
);
hInternet
=
InternetOpen
(
"winetest"
,
0
,
NULL
,
NULL
,
0
);
ok
(
hInternet
!=
NULL
,
"InternetOpen failed: %u
\n
"
,
GetLastError
());
...
...
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