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
47a3719f
Commit
47a3719f
authored
Aug 06, 2015
by
Piotr Caban
Committed by
Alexandre Julliard
Aug 06, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcp120: Fix tr2::sys::_Copy_file test failures on non-ntfs file system.
parent
4829989c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
15 deletions
+18
-15
msvcp120.c
dlls/msvcp120/tests/msvcp120.c
+18
-15
No files found.
dlls/msvcp120/tests/msvcp120.c
View file @
47a3719f
...
...
@@ -558,18 +558,20 @@ static void test_tr2_sys__Copy_file(void)
char
const
*
dest
;
MSVCP_bool
fail_if_exists
;
int
last_error
;
int
last_error2
;
MSVCP_bool
is_todo
;
}
tests
[]
=
{
{
"f1"
,
"f1_copy"
,
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
"f1"
,
"tr2_test_dir
\\
f1_copy"
,
TRUE
,
ERROR_SUCCESS
,
FALSE
},
{
"f1"
,
"tr2_test_dir
\\
f1_copy"
,
TRUE
,
ERROR_FILE_EXISTS
,
FALSE
},
{
"f1"
,
"tr2_test_dir
\\
f1_copy"
,
FALSE
,
ERROR_SUCCESS
,
FALSE
},
{
"tr2_test_dir"
,
"f1"
,
TRUE
,
ERROR_ACCESS_DENIED
,
FALSE
},
{
"tr2_test_dir"
,
"tr2_test_dir_copy"
,
TRUE
,
ERROR_ACCESS_DENIED
,
FALSE
},
{
NULL
,
"f1"
,
TRUE
,
ERROR_INVALID_PARAMETER
,
TRUE
},
{
"f1"
,
NULL
,
TRUE
,
ERROR_INVALID_PARAMETER
,
TRUE
},
{
"not_exist"
,
"tr2_test_dir"
,
TRUE
,
ERROR_FILE_NOT_FOUND
,
FALSE
},
{
"f1"
,
"not_exist_dir
\\
f1_copy"
,
TRUE
,
ERROR_PATH_NOT_FOUND
,
FALSE
}
{
"f1"
,
"f1_copy"
,
TRUE
,
ERROR_SUCCESS
,
ERROR_SUCCESS
,
FALSE
},
{
"f1"
,
"tr2_test_dir
\\
f1_copy"
,
TRUE
,
ERROR_SUCCESS
,
ERROR_SUCCESS
,
FALSE
},
{
"f1"
,
"tr2_test_dir
\\
f1_copy"
,
TRUE
,
ERROR_FILE_EXISTS
,
ERROR_FILE_EXISTS
,
FALSE
},
{
"f1"
,
"tr2_test_dir
\\
f1_copy"
,
FALSE
,
ERROR_SUCCESS
,
ERROR_SUCCESS
,
FALSE
},
{
"tr2_test_dir"
,
"f1"
,
TRUE
,
ERROR_ACCESS_DENIED
,
ERROR_ACCESS_DENIED
,
FALSE
},
{
"tr2_test_dir"
,
"tr2_test_dir_copy"
,
TRUE
,
ERROR_ACCESS_DENIED
,
ERROR_ACCESS_DENIED
,
FALSE
},
{
NULL
,
"f1"
,
TRUE
,
ERROR_INVALID_PARAMETER
,
ERROR_INVALID_PARAMETER
,
TRUE
},
{
"f1"
,
NULL
,
TRUE
,
ERROR_INVALID_PARAMETER
,
ERROR_INVALID_PARAMETER
,
TRUE
},
{
"not_exist"
,
"tr2_test_dir"
,
TRUE
,
ERROR_FILE_NOT_FOUND
,
ERROR_FILE_NOT_FOUND
,
FALSE
},
{
"f1"
,
"not_exist_dir
\\
f1_copy"
,
TRUE
,
ERROR_PATH_NOT_FOUND
,
ERROR_FILE_NOT_FOUND
,
FALSE
},
{
"f1"
,
"tr2_test_dir"
,
TRUE
,
ERROR_ACCESS_DENIED
,
ERROR_FILE_EXISTS
,
FALSE
}
};
ret
=
p_tr2_sys__Make_dir
(
"tr2_test_dir"
);
...
...
@@ -585,17 +587,18 @@ static void test_tr2_sys__Copy_file(void)
errno
=
0xdeadbeef
;
ret
=
p_tr2_sys__Copy_file
(
tests
[
i
].
source
,
tests
[
i
].
dest
,
tests
[
i
].
fail_if_exists
);
if
(
tests
[
i
].
is_todo
)
todo_wine
ok
(
ret
==
tests
[
i
].
last_error
,
"test_tr2_sys__Copy_file(): test %d expect: %d, got %d
\n
"
,
i
+
1
,
tests
[
i
].
last_error
,
ret
);
todo_wine
ok
(
ret
==
tests
[
i
].
last_error
||
ret
==
tests
[
i
].
last_error2
,
"test_tr2_sys__Copy_file(): test %d expect: %d, got %d
\n
"
,
i
+
1
,
tests
[
i
].
last_error
,
ret
);
else
ok
(
ret
==
tests
[
i
].
last_error
,
"test_tr2_sys__Copy_file(): test %d expect: %d, got %d
\n
"
,
i
+
1
,
tests
[
i
].
last_error
,
ret
);
ok
(
ret
==
tests
[
i
].
last_error
||
ret
==
tests
[
i
].
last_error2
,
"test_tr2_sys__Copy_file(): test %d expect: %d, got %d
\n
"
,
i
+
1
,
tests
[
i
].
last_error
,
ret
);
ok
(
errno
==
0xdeadbeef
,
"test_tr2_sys__Copy_file(): test %d errno expect 0xdeadbeef, got %d
\n
"
,
i
+
1
,
errno
);
if
(
ret
==
ERROR_SUCCESS
)
ok
(
p_tr2_sys__File_size
(
tests
[
i
].
source
)
==
p_tr2_sys__File_size
(
tests
[
i
].
dest
),
"test_tr2_sys__Copy_file(): test %d failed, two files' size are not equal
\n
"
,
i
+
1
);
}
ret
=
p_tr2_sys__Copy_file
(
"f1"
,
"tr2_test_dir"
,
TRUE
);
ok
(
ret
==
ERROR_ACCESS_DENIED
||
ret
==
ERROR_FILE_EXISTS
,
"test_tr2_sys__Copy_file(): expect: ERROR_ACCESS_DENIED or ERROR_FILE_EXISTS, got %d
\n
"
,
ret
);
ok
(
DeleteFileA
(
"f1"
),
"expect f1 to exist
\n
"
);
ok
(
DeleteFileA
(
"f1_copy"
),
"expect f1_copy to exist
\n
"
);
...
...
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