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
1975ba27
Commit
1975ba27
authored
Jul 13, 2009
by
Nicolas Le Cam
Committed by
Alexandre Julliard
Aug 03, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Test GetVolumeInformation when current directory is a root directory.
parent
c562d444
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
volume.c
dlls/kernel32/tests/volume.c
+24
-0
No files found.
dlls/kernel32/tests/volume.c
View file @
1975ba27
...
...
@@ -299,6 +299,7 @@ static void test_GetVolumeInformationA(void)
DWORD
vol_name_size
=
MAX_PATH
+
1
,
vol_serial_num
=-
1
,
max_comp_len
=
0
,
fs_flags
=
0
,
fs_name_len
=
MAX_PATH
+
1
;
char
vol_name_buf
[
MAX_PATH
+
1
],
fs_name_buf
[
MAX_PATH
+
1
];
char
windowsdir
[
MAX_PATH
+
10
];
char
currentdir
[
MAX_PATH
+
1
];
if
(
!
pGetVolumeInformationA
)
{
win_skip
(
"GetVolumeInformationA not found
\n
"
);
...
...
@@ -328,6 +329,29 @@ static void test_GetVolumeInformationA(void)
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_NAME
,
"GetVolumeInformationA w/o '
\\
' did not fail, last error %u
\n
"
,
GetLastError
());
result
=
GetCurrentDirectory
(
MAX_PATH
,
currentdir
);
ok
(
result
,
"GetCurrentDirectory: error %d
\n
"
,
GetLastError
());
/* check for error on no trailing \ when current dir is root dir */
ret
=
SetCurrentDirectory
(
Root_Dir1
);
ok
(
ret
,
"SetCurrentDirectory: error %d
\n
"
,
GetLastError
());
ret
=
pGetVolumeInformationA
(
Root_Dir0
,
vol_name_buf
,
vol_name_size
,
NULL
,
NULL
,
NULL
,
fs_name_buf
,
fs_name_len
);
todo_wine
ok
(
ret
,
"GetVolumeInformationA failed, last error %u
\n
"
,
GetLastError
());
/* check for error on no trailing \ when current dir is windows dir */
ret
=
SetCurrentDirectory
(
windowsdir
);
ok
(
ret
,
"SetCurrentDirectory: error %d
\n
"
,
GetLastError
());
ret
=
pGetVolumeInformationA
(
Root_Dir0
,
vol_name_buf
,
vol_name_size
,
NULL
,
NULL
,
NULL
,
fs_name_buf
,
fs_name_len
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_NAME
,
"GetVolumeInformationA did not fail, last error %u
\n
"
,
GetLastError
());
/* reset current directory */
ret
=
SetCurrentDirectory
(
currentdir
);
ok
(
ret
,
"SetCurrentDirectory: error %d
\n
"
,
GetLastError
());
/* try null root directory to return "root of the current directory" */
ret
=
pGetVolumeInformationA
(
NULL
,
vol_name_buf
,
vol_name_size
,
NULL
,
NULL
,
NULL
,
fs_name_buf
,
fs_name_len
);
...
...
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