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
156dad05
Commit
156dad05
authored
May 26, 2008
by
Paul Vriens
Committed by
Alexandre Julliard
May 26, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setupapi/tests: Test registry after testDeviceRegistryProperty.
parent
3573b90b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
devinst.c
dlls/setupapi/tests/devinst.c
+32
-0
No files found.
dlls/setupapi/tests/devinst.c
View file @
156dad05
...
@@ -1046,6 +1046,10 @@ static void testDeviceRegistryPropertyA()
...
@@ -1046,6 +1046,10 @@ static void testDeviceRegistryPropertyA()
DWORD
size
;
DWORD
size
;
DWORD
regType
;
DWORD
regType
;
BOOL
ret
;
BOOL
ret
;
LONG
res
;
HKEY
key
;
static
const
CHAR
bogus
[]
=
"System
\\
CurrentControlSet
\\
Enum
\\
Root
\\
LEGACY_BOGUS"
;
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
set
=
pSetupDiGetClassDevsA
(
&
guid
,
NULL
,
0
,
DIGCF_DEVICEINTERFACE
);
set
=
pSetupDiGetClassDevsA
(
&
guid
,
NULL
,
0
,
DIGCF_DEVICEINTERFACE
);
...
@@ -1122,6 +1126,17 @@ static void testDeviceRegistryPropertyA()
...
@@ -1122,6 +1126,17 @@ static void testDeviceRegistryPropertyA()
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_DATA
,
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_DATA
,
"Expected ERROR_INVALID_DATA, got %08x
\n
"
,
GetLastError
());
"Expected ERROR_INVALID_DATA, got %08x
\n
"
,
GetLastError
());
pSetupDiDestroyDeviceInfoList
(
set
);
pSetupDiDestroyDeviceInfoList
(
set
);
res
=
RegOpenKeyA
(
HKEY_LOCAL_MACHINE
,
bogus
,
&
key
);
todo_wine
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"Expected key to not exist
\n
"
);
/* FIXME: Remove when Wine is fixed */
if
(
res
==
ERROR_SUCCESS
)
{
/* Wine doesn't delete the information currently */
trace
(
"We are most likely on Wine
\n
"
);
RegDeleteKeyA
(
HKEY_LOCAL_MACHINE
,
bogus
);
}
}
}
static
void
testDeviceRegistryPropertyW
()
static
void
testDeviceRegistryPropertyW
()
...
@@ -1135,6 +1150,12 @@ static void testDeviceRegistryPropertyW()
...
@@ -1135,6 +1150,12 @@ static void testDeviceRegistryPropertyW()
DWORD
size
;
DWORD
size
;
DWORD
regType
;
DWORD
regType
;
BOOL
ret
;
BOOL
ret
;
LONG
res
;
HKEY
key
;
static
const
WCHAR
bogus
[]
=
{
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'S'
,
'e'
,
't'
,
'\\'
,
'E'
,
'n'
,
'u'
,
'm'
,
'\\'
,
'R'
,
'o'
,
'o'
,
't'
,
'\\'
,
'L'
,
'E'
,
'G'
,
'A'
,
'C'
,
'Y'
,
'_'
,
'B'
,
'O'
,
'G'
,
'U'
,
'S'
,
0
};
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
set
=
pSetupDiGetClassDevsW
(
&
guid
,
NULL
,
0
,
DIGCF_DEVICEINTERFACE
);
set
=
pSetupDiGetClassDevsW
(
&
guid
,
NULL
,
0
,
DIGCF_DEVICEINTERFACE
);
...
@@ -1216,6 +1237,17 @@ static void testDeviceRegistryPropertyW()
...
@@ -1216,6 +1237,17 @@ static void testDeviceRegistryPropertyW()
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_DATA
,
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_DATA
,
"Expected ERROR_INVALID_DATA, got %08x
\n
"
,
GetLastError
());
"Expected ERROR_INVALID_DATA, got %08x
\n
"
,
GetLastError
());
pSetupDiDestroyDeviceInfoList
(
set
);
pSetupDiDestroyDeviceInfoList
(
set
);
res
=
RegOpenKeyW
(
HKEY_LOCAL_MACHINE
,
bogus
,
&
key
);
todo_wine
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"Expected key to not exist
\n
"
);
/* FIXME: Remove when Wine is fixed */
if
(
res
==
ERROR_SUCCESS
)
{
/* Wine doesn't delete the information currently */
trace
(
"We are most likely on Wine
\n
"
);
RegDeleteKeyW
(
HKEY_LOCAL_MACHINE
,
bogus
);
}
}
}
START_TEST
(
devinst
)
START_TEST
(
devinst
)
...
...
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