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
c4d12bde
Commit
c4d12bde
authored
Dec 01, 2009
by
Hans Leidekker
Committed by
Alexandre Julliard
Dec 01, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet/tests: Trace extended errors in a couple of places.
parent
fd8620f6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
4 deletions
+23
-4
ftp.c
dlls/wininet/tests/ftp.c
+23
-4
No files found.
dlls/wininet/tests/ftp.c
View file @
c4d12bde
...
...
@@ -360,6 +360,20 @@ static void test_getfile(HINTERNET hFtp, HINTERNET hConnect)
"Expected ERROR_INTERNET_INCORRECT_HANDLE_TYPE, got %d
\n
"
,
GetLastError
());
}
static
void
trace_extended_error
(
DWORD
error
)
{
DWORD
code
,
buflen
=
0
;
if
(
error
!=
ERROR_INTERNET_EXTENDED_ERROR
)
return
;
if
(
!
InternetGetLastResponseInfoA
(
&
code
,
NULL
,
&
buflen
)
&&
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
)
{
char
*
text
=
HeapAlloc
(
GetProcessHeap
(),
0
,
++
buflen
);
InternetGetLastResponseInfoA
(
&
code
,
text
,
&
buflen
);
trace
(
"%u %s
\n
"
,
code
,
text
);
HeapFree
(
GetProcessHeap
(),
0
,
text
);
}
}
static
void
test_openfile
(
HINTERNET
hFtp
,
HINTERNET
hConnect
)
{
HINTERNET
hOpenFile
;
...
...
@@ -414,21 +428,26 @@ static void test_openfile(HINTERNET hFtp, HINTERNET hConnect)
if
(
hOpenFile
)
{
BOOL
bRet
;
DWORD
error
;
HINTERNET
hOpenFile2
;
HANDLE
hFile
;
/* We have a handle so all ftp calls should fail (TODO: Put all ftp-calls in here) */
SetLastError
(
0xdeadbeef
);
bRet
=
FtpCreateDirectoryA
(
hFtp
,
"new_directory_deadbeef"
);
error
=
GetLastError
();
ok
(
bRet
==
FALSE
,
"Expected FtpCreateDirectoryA to fail
\n
"
);
ok
(
GetLastError
()
==
ERROR_FTP_TRANSFER_IN_PROGRESS
,
"Expected ERROR_FTP_TRANSFER_IN_PROGRESS, got %d
\n
"
,
GetLastError
());
ok
(
error
==
ERROR_FTP_TRANSFER_IN_PROGRESS
,
"Expected ERROR_FTP_TRANSFER_IN_PROGRESS, got %d
\n
"
,
error
);
trace_extended_error
(
error
);
SetLastError
(
0xdeadbeef
);
bRet
=
FtpDeleteFileA
(
hFtp
,
"non_existent_file_deadbeef"
);
error
=
GetLastError
();
ok
(
bRet
==
FALSE
,
"Expected FtpDeleteFileA to fail
\n
"
);
ok
(
GetLastError
()
==
ERROR_FTP_TRANSFER_IN_PROGRESS
,
"Expected ERROR_FTP_TRANSFER_IN_PROGRESS, got %d
\n
"
,
GetLastError
());
ok
(
error
==
ERROR_FTP_TRANSFER_IN_PROGRESS
,
"Expected ERROR_FTP_TRANSFER_IN_PROGRESS, got %d
\n
"
,
error
);
trace_extended_error
(
error
);
SetLastError
(
0xdeadbeef
);
bRet
=
FtpGetFileA
(
hFtp
,
"welcome.msg"
,
"should_be_non_existing_deadbeef"
,
FALSE
,
FILE_ATTRIBUTE_NORMAL
,
FTP_TRANSFER_TYPE_UNKNOWN
,
0
);
...
...
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