Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e3d72747
Commit
e3d72747
authored
Mar 20, 2007
by
Paul Vriens
Committed by
Alexandre Julliard
Mar 21, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet/tests: Expose a problem with FtpGetFile.
parent
b6f92f10
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
ftp.c
dlls/wininet/tests/ftp.c
+40
-0
No files found.
dlls/wininet/tests/ftp.c
View file @
e3d72747
...
...
@@ -831,6 +831,39 @@ static void test_renamefile(void)
InternetCloseHandle
(
hInternet
);
}
static
void
test_multiple
(
void
)
{
BOOL
bRet
;
HINTERNET
hInternet
,
hFtp
,
hOpenFile
;
hInternet
=
InternetOpen
(
NULL
,
0
,
NULL
,
NULL
,
0
);
hFtp
=
InternetConnect
(
hInternet
,
"ftp.winehq.org"
,
INTERNET_DEFAULT_FTP_PORT
,
"anonymous"
,
"IEUser@"
,
INTERNET_SERVICE_FTP
,
0
,
0
);
if
(
!
hFtp
)
{
skip
(
"No ftp connection could be made to ftp.winehq.org
\n
"
);
InternetCloseHandle
(
hInternet
);
return
;
}
/* A correct call */
bRet
=
FtpGetFileA
(
hFtp
,
"welcome.msg"
,
"should_be_non_existing_deadbeef"
,
FALSE
,
FILE_ATTRIBUTE_NORMAL
,
FTP_TRANSFER_TYPE_UNKNOWN
,
0
);
DeleteFileA
(
"should_be_non_existing_deadbeef"
);
/* This call by itself succeeds in Wine for the test_openfile test */
SetLastError
(
0xdeadbeef
);
hOpenFile
=
FtpOpenFileA
(
hFtp
,
"welcome.msg"
,
GENERIC_READ
,
FTP_TRANSFER_TYPE_ASCII
,
0
);
todo_wine
{
ok
(
hOpenFile
!=
NULL
,
"Expected FtpOpenFileA to succeed
\n
"
);
ok
(
GetLastError
()
==
ERROR_SUCCESS
||
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"Expected ERROR_SUCCESS or ERROR_FILE_NOT_FOUND (win98), got %d
\n
"
,
GetLastError
());
}
InternetCloseHandle
(
hOpenFile
);
InternetCloseHandle
(
hFtp
);
InternetCloseHandle
(
hInternet
);
}
START_TEST
(
ftp
)
{
/* The first call should always be a proper InternetOpen, if not
...
...
@@ -850,4 +883,11 @@ START_TEST(ftp)
test_putfile
();
test_removedir
();
test_renamefile
();
/* A test that does two particular calls in one connection, this currently fails on Wine.
* The problem lies in FtpGetFile but is exposed in FtpOpenFile.
* Once this is fixed we should change the total test to setup and clear the connections
* only once. (and get rid of test_multiple).
*/
test_multiple
();
}
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