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
62279b7f
Commit
62279b7f
authored
Jun 17, 2015
by
Erich E. Hoover
Committed by
Alexandre Julliard
Jun 23, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Add a bunch more GetVolumePathName tests.
parent
b29b0d2c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
1 deletion
+31
-1
volume.c
dlls/kernel32/tests/volume.c
+31
-1
No files found.
dlls/kernel32/tests/volume.c
View file @
62279b7f
...
...
@@ -635,6 +635,34 @@ static void test_GetVolumePathNameA(void)
"
\\\\
$$$"
,
"C:
\\
"
,
1
,
ERROR_INVALID_NAME
,
ERROR_FILENAME_EXCED_RANGE
},
{
/* test 9: a reasonable DOS path that is guaranteed to exist */
"C:
\\
windows
\\
system32"
,
"C:
\\
"
,
sizeof
(
volume_path
),
NO_ERROR
,
NO_ERROR
},
{
/* test 10: a reasonable DOS path that shouldn't exist */
"C:
\\
windows
\\
system32
\\
AnInvalidFolder"
,
"C:
\\
"
,
sizeof
(
volume_path
),
NO_ERROR
,
NO_ERROR
},
{
/* test 11: a reasonable NT-converted DOS path that shouldn't exist */
"
\\\\
?
\\
C:
\\
AnInvalidFolder"
,
"
\\\\
?
\\
C:
\\
"
,
sizeof
(
volume_path
),
NO_ERROR
,
NO_ERROR
},
{
/* test 12: an unreasonable NT-converted DOS path */
"
\\\\
?
\\
InvalidDrive:
\\
AnInvalidFolder"
,
"
\\\\
?
\\
InvalidDrive:
\\
"
/* win2k, winxp */
,
sizeof
(
volume_path
),
ERROR_INVALID_NAME
,
NO_ERROR
},
{
/* test 13: an unreasonable NT volume path */
"
\\\\
?
\\
Volume{00000000-00-0000-0000-000000000000}
\\
AnInvalidFolder"
,
"
\\\\
?
\\
Volume{00000000-00-0000-0000-000000000000}
\\
"
/* win2k, winxp */
,
sizeof
(
volume_path
),
ERROR_INVALID_NAME
,
NO_ERROR
},
{
/* test 14: an unreasonable NT-ish path */
"
\\\\
ReallyBogus
\\
InvalidDrive:
\\
AnInvalidFolder"
,
"
\\\\
ReallyBogus
\\
InvalidDrive:
\\
"
/* win2k, winxp */
,
sizeof
(
volume_path
),
ERROR_INVALID_NAME
,
NO_ERROR
},
};
BOOL
ret
,
success
;
DWORD
error
;
...
...
@@ -649,6 +677,7 @@ static void test_GetVolumePathNameA(void)
for
(
i
=
0
;
i
<
sizeof
(
test_paths
)
/
sizeof
(
test_paths
[
0
]);
i
++
)
{
BOOL
broken_ret
=
test_paths
[
i
].
broken_error
==
NO_ERROR
?
TRUE
:
FALSE
;
char
*
output
=
(
test_paths
[
i
].
path_name
!=
NULL
?
volume_path
:
NULL
);
BOOL
expected_ret
=
test_paths
[
i
].
error
==
NO_ERROR
?
TRUE
:
FALSE
;
...
...
@@ -656,7 +685,8 @@ static void test_GetVolumePathNameA(void)
SetLastError
(
0xdeadbeef
);
ret
=
pGetVolumePathNameA
(
test_paths
[
i
].
file_name
,
output
,
test_paths
[
i
].
path_len
);
error
=
GetLastError
();
ok
(
ret
==
expected_ret
,
"GetVolumePathName test %d %s unexpectedly.
\n
"
,
ok
(
ret
==
expected_ret
||
broken
(
ret
==
broken_ret
),
"GetVolumePathName test %d %s unexpectedly.
\n
"
,
i
,
test_paths
[
i
].
error
==
NO_ERROR
?
"failed"
:
"succeeded"
);
if
(
ret
)
...
...
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