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
c63d085d
Commit
c63d085d
authored
Jul 23, 2011
by
Dan Kegel
Committed by
Alexandre Julliard
Jul 25, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Add initial test for DefineDosDevice.
parent
b09b7e32
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
volume.c
dlls/kernel32/tests/volume.c
+35
-0
No files found.
dlls/kernel32/tests/volume.c
View file @
c63d085d
...
...
@@ -75,6 +75,40 @@ static void test_query_dos_deviceA(void)
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
}
void
test_define_dos_deviceA
(
void
)
{
char
drivestr
[
3
];
char
buf
[
MAX_PATH
];
DWORD
ret
;
/* Find an unused drive letter */
drivestr
[
1
]
=
':'
;
drivestr
[
2
]
=
0
;
for
(
drivestr
[
0
]
=
'a'
;
drivestr
[
0
]
<=
'z'
;
drivestr
[
0
]
++
)
{
ret
=
QueryDosDeviceA
(
drivestr
,
buf
,
sizeof
(
buf
));
if
(
!
ret
)
break
;
}
if
(
drivestr
[
0
]
>
'z'
)
{
skip
(
"can't test creating a dos drive, none available
\n
"
);
return
;
}
/* Map it to point to the current directory */
ret
=
GetCurrentDirectory
(
sizeof
(
buf
),
buf
);
ok
(
ret
,
"GetCurrentDir
\n
"
);
ret
=
DefineDosDeviceA
(
0
,
drivestr
,
buf
);
todo_wine
ok
(
ret
,
"Could not make drive %s point to %s!
\n
"
,
drivestr
,
buf
);
if
(
!
ret
)
{
skip
(
"can't test removing fake drive
\n
"
);
}
else
{
ret
=
DefineDosDeviceA
(
DDD_REMOVE_DEFINITION
,
drivestr
,
NULL
);
ok
(
ret
,
"Could not remove fake drive %s!
\n
"
,
drivestr
);
}
}
static
void
test_FindFirstVolume
(
void
)
{
char
volume
[
51
];
...
...
@@ -705,6 +739,7 @@ START_TEST(volume)
pGetVolumePathNamesForVolumeNameW
=
(
void
*
)
GetProcAddress
(
hdll
,
"GetVolumePathNamesForVolumeNameW"
);
test_query_dos_deviceA
();
test_define_dos_deviceA
();
test_FindFirstVolume
();
test_GetVolumeNameForVolumeMountPointA
();
test_GetVolumeNameForVolumeMountPointW
();
...
...
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