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
37eb0955
Commit
37eb0955
authored
Feb 07, 2007
by
Paul Vriens
Committed by
Alexandre Julliard
Feb 07, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet/tests: Add a few more tests.
parent
70be65b7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
2 deletions
+21
-2
ftp.c
dlls/wininet/tests/ftp.c
+21
-2
No files found.
dlls/wininet/tests/ftp.c
View file @
37eb0955
...
...
@@ -253,6 +253,11 @@ static void test_getfile(void)
return
;
}
/* Make sure we start clean */
DeleteFileA
(
"should_be_non_existing_deadbeef"
);
DeleteFileA
(
"should_also_be_non_existing_deadbeef"
);
/* We should have a ftp-connection, try some getting */
/* No remote file */
...
...
@@ -260,8 +265,14 @@ static void test_getfile(void)
bRet
=
FtpGetFileA
(
hFtp
,
NULL
,
"should_be_non_existing_deadbeef"
,
FALSE
,
FILE_ATTRIBUTE_NORMAL
,
FTP_TRANSFER_TYPE_UNKNOWN
,
0
);
ok
(
bRet
==
FALSE
,
"Expected FtpGetFileA to fail
\n
"
);
todo_wine
{
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
/* Currently Wine always creates the local file (even on failure) which is not correct, hence the test */
ok
(
GetFileAttributesA
(
"should_be_non_existing_deadbeef"
)
==
INVALID_FILE_ATTRIBUTES
,
"Local file should not have been created
\n
"
);
}
DeleteFileA
(
"should_be_non_existing_deadbeef"
);
/* No local file */
SetLastError
(
0xdeadbeef
);
...
...
@@ -280,6 +291,9 @@ static void test_getfile(void)
ok
(
GetLastError
()
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
GetLastError
());
}
/* Wine passes this test but for the wrong reason */
ok
(
GetFileAttributesA
(
"should_be_non_existing_deadbeef"
)
!=
INVALID_FILE_ATTRIBUTES
,
"Local file should have been created
\n
"
);
DeleteFileA
(
"should_be_non_existing_deadbeef"
);
/* Illegal condition flags */
...
...
@@ -287,20 +301,25 @@ static void test_getfile(void)
bRet
=
FtpGetFileA
(
hFtp
,
"welcome.msg"
,
"should_be_non_existing_deadbeef"
,
FALSE
,
FILE_ATTRIBUTE_NORMAL
,
5
,
0
);
ok
(
bRet
==
FALSE
,
"Expected FtpGetFileA to fail
\n
"
);
todo_wine
{
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
ok
(
GetFileAttributesA
(
"should_be_non_existing_deadbeef"
)
==
INVALID_FILE_ATTRIBUTES
,
"Local file should not have been created
\n
"
);
}
DeleteFileA
(
"should_be_non_existing_deadbeef"
);
/* Remote file doesn't exist */
SetLastError
(
0xdeadbeef
);
bRet
=
FtpGetFileA
(
hFtp
,
"should_be_non_existing_deadbeef"
,
"should_also_be_non_existing_deadbeef"
,
FALSE
,
FILE_ATTRIBUTE_NORMAL
,
FTP_TRANSFER_TYPE_UNKNOWN
,
0
);
ok
(
bRet
==
FALSE
,
"Expected FtpGetFileA to fail
\n
"
);
todo_wine
{
ok
(
GetLastError
()
==
ERROR_INTERNET_EXTENDED_ERROR
,
"Expected ERROR_INTERNET_EXTENDED_ERROR, got %d
\n
"
,
GetLastError
());
/* Wine currently creates the file (empty though), cater for that */
todo_wine
ok
(
GetFileAttributesA
(
"should_also_be_non_existing_deadbeef"
)
==
INVALID_FILE_ATTRIBUTES
,
"Local file should not have been created
\n
"
);
}
DeleteFileA
(
"should_also_be_non_existing_deadbeef"
);
/* This one should succeed and give us a copy of the 'welcome.msg' file */
...
...
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