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
9b7113bc
Commit
9b7113bc
authored
Jan 26, 2019
by
Gijs Vermeulen
Committed by
Alexandre Julliard
Jan 28, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Add CopyFile[Ex]A NULL handling tests.
Signed-off-by:
Gijs Vermeulen
<
gijsvrm@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e07d25c7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
file.c
dlls/kernel32/tests/file.c
+15
-0
No files found.
dlls/kernel32/tests/file.c
View file @
9b7113bc
...
...
@@ -738,6 +738,14 @@ static void test_CopyFileA(void)
ret
=
CopyFileA
(
source
,
dest
,
FALSE
);
ok
(
ret
,
"CopyFileA: error %d
\n
"
,
GetLastError
());
/* NULL checks */
retok
=
CopyFileA
(
NULL
,
dest
,
TRUE
);
ok
(
!
retok
&&
GetLastError
()
==
ERROR_PATH_NOT_FOUND
,
"CopyFileA: ret = %d, unexpected error %d
\n
"
,
retok
,
GetLastError
());
retok
=
CopyFileA
(
source
,
NULL
,
TRUE
);
ok
(
!
retok
&&
GetLastError
()
==
ERROR_PATH_NOT_FOUND
,
"CopyFileA: ret = %d, unexpected error %d
\n
"
,
retok
,
GetLastError
());
/* copying from a read-locked source fails */
hfile
=
CreateFileA
(
source
,
GENERIC_READ
,
FILE_SHARE_WRITE
,
NULL
,
OPEN_EXISTING
,
0
,
0
);
ok
(
hfile
!=
INVALID_HANDLE_VALUE
,
"failed to open source file, error %d
\n
"
,
GetLastError
());
...
...
@@ -1174,6 +1182,13 @@ static void test_CopyFileEx(void)
todo_wine
ok
(
GetFileAttributesA
(
dest
)
==
INVALID_FILE_ATTRIBUTES
,
"file was not deleted
\n
"
);
retok
=
CopyFileExA
(
source
,
NULL
,
copy_progress_cb
,
hfile
,
NULL
,
0
);
ok
(
!
retok
,
"CopyFileExA unexpectedly succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_PATH_NOT_FOUND
,
"expected ERROR_PATH_NOT_FOUND, got %d
\n
"
,
GetLastError
());
retok
=
CopyFileExA
(
NULL
,
dest
,
copy_progress_cb
,
hfile
,
NULL
,
0
);
ok
(
!
retok
,
"CopyFileExA unexpectedly succeeded
\n
"
);
ok
(
GetLastError
()
==
ERROR_PATH_NOT_FOUND
,
"expected ERROR_PATH_NOT_FOUND, got %d
\n
"
,
GetLastError
());
ret
=
DeleteFileA
(
source
);
ok
(
ret
,
"DeleteFileA failed with error %d
\n
"
,
GetLastError
());
ret
=
DeleteFileA
(
dest
);
...
...
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