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
96b03962
Commit
96b03962
authored
Aug 24, 2013
by
George Stephanos
Committed by
Alexandre Julliard
Aug 26, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Add more tests for hkcr handle mask in existent tests.
parent
69208b60
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
registry.c
dlls/advapi32/tests/registry.c
+12
-0
No files found.
dlls/advapi32/tests/registry.c
View file @
96b03962
...
...
@@ -2122,6 +2122,7 @@ static void test_classesroot(void)
skip
(
"not enough privileges to add a user class
\n
"
);
return
;
}
ok
(
!
IS_HKCR
(
hkey
),
"hkcr mask set in %p
\n
"
,
hkey
);
/* try to open that key in hkcr */
res
=
RegOpenKeyExA
(
HKEY_CLASSES_ROOT
,
"WineTestCls"
,
0
,
...
...
@@ -2129,6 +2130,7 @@ static void test_classesroot(void)
todo_wine
ok
(
res
==
ERROR_SUCCESS
||
broken
(
res
==
ERROR_FILE_NOT_FOUND
/* WinNT */
),
"test key not found in hkcr: %d
\n
"
,
res
);
todo_wine
ok
(
IS_HKCR
(
hkcr
),
"hkcr mask not set in %p
\n
"
,
hkcr
);
if
(
res
)
{
skip
(
"HKCR key merging not supported
\n
"
);
...
...
@@ -2192,12 +2194,14 @@ static void test_classesroot(void)
skip
(
"not enough privileges to add a system class
\n
"
);
return
;
}
ok
(
!
IS_HKCR
(
hklm
),
"hkcr mask set in %p
\n
"
,
hklm
);
/* try to open that key in hkcr */
res
=
RegOpenKeyExA
(
HKEY_CLASSES_ROOT
,
"WineTestCls"
,
0
,
KEY_QUERY_VALUE
|
KEY_SET_VALUE
,
&
hkcr
);
ok
(
res
==
ERROR_SUCCESS
,
"test key not found in hkcr: %d
\n
"
,
res
);
ok
(
IS_HKCR
(
hkcr
),
"hkcr mask not set in %p
\n
"
,
hkcr
);
if
(
res
)
{
delete_key
(
hklm
);
...
...
@@ -2225,12 +2229,14 @@ static void test_classesroot(void)
if
(
RegCreateKeyExA
(
HKEY_CURRENT_USER
,
"Software
\\
Classes
\\
WineTestCls"
,
0
,
NULL
,
0
,
KEY_QUERY_VALUE
|
KEY_SET_VALUE
,
NULL
,
&
hkey
,
NULL
))
return
;
ok
(
!
IS_HKCR
(
hkey
),
"hkcr mask set in %p
\n
"
,
hkey
);
/* try to open that key in hkcr */
res
=
RegOpenKeyExA
(
HKEY_CLASSES_ROOT
,
"WineTestCls"
,
0
,
KEY_QUERY_VALUE
|
KEY_SET_VALUE
,
&
hkcr
);
ok
(
res
==
ERROR_SUCCESS
,
"test key not found in hkcr: %d
\n
"
,
res
);
ok
(
IS_HKCR
(
hkcr
),
"hkcr mask not set in %p
\n
"
,
hkcr
);
/* set a value in user's classes */
res
=
RegSetValueExA
(
hkey
,
"val2"
,
0
,
REG_SZ
,
(
const
BYTE
*
)
"user"
,
sizeof
(
"user"
));
...
...
@@ -2268,9 +2274,11 @@ static void test_classesroot(void)
/* create a subkey in hklm */
if
(
RegCreateKeyExA
(
hklm
,
"subkey1"
,
0
,
NULL
,
0
,
KEY_QUERY_VALUE
|
KEY_SET_VALUE
,
NULL
,
&
hklmsub1
,
NULL
))
return
;
ok
(
!
IS_HKCR
(
hklmsub1
),
"hkcr mask set in %p
\n
"
,
hklmsub1
);
/* try to open that subkey in hkcr */
res
=
RegOpenKeyExA
(
hkcr
,
"subkey1"
,
0
,
KEY_QUERY_VALUE
|
KEY_SET_VALUE
,
&
hkcrsub1
);
ok
(
res
==
ERROR_SUCCESS
,
"test key not found in hkcr: %d
\n
"
,
res
);
ok
(
IS_HKCR
(
hkcrsub1
),
"hkcr mask not set in %p
\n
"
,
hkcrsub1
);
/* set a value in hklm classes */
res
=
RegSetValueExA
(
hklmsub1
,
"subval1"
,
0
,
REG_SZ
,
(
const
BYTE
*
)
"hklm"
,
sizeof
(
"hklm"
));
...
...
@@ -2293,6 +2301,7 @@ static void test_classesroot(void)
/* create a subkey in user's classes */
if
(
RegCreateKeyExA
(
hkey
,
"subkey1"
,
0
,
NULL
,
0
,
KEY_QUERY_VALUE
|
KEY_SET_VALUE
,
NULL
,
&
hkeysub1
,
NULL
))
return
;
ok
(
!
IS_HKCR
(
hkeysub1
),
"hkcr mask set in %p
\n
"
,
hkeysub1
);
/* set a value in user's classes */
res
=
RegSetValueExA
(
hkeysub1
,
"subval1"
,
0
,
REG_SZ
,
(
const
BYTE
*
)
"user"
,
sizeof
(
"user"
));
...
...
@@ -2330,6 +2339,7 @@ static void test_classesroot(void)
/* new subkey in hkcr */
if
(
RegCreateKeyExA
(
hkcr
,
"subkey2"
,
0
,
NULL
,
0
,
KEY_QUERY_VALUE
|
KEY_SET_VALUE
,
NULL
,
&
hkcrsub2
,
NULL
))
return
;
ok
(
IS_HKCR
(
hkcrsub2
),
"hkcr mask not set in %p
\n
"
,
hkcrsub2
);
res
=
RegSetValueExA
(
hkcrsub2
,
"subval1"
,
0
,
REG_SZ
,
(
const
BYTE
*
)
"hkcr"
,
sizeof
(
"hkcr"
));
ok
(
res
==
ERROR_SUCCESS
,
"RegSetValueExA failed: %d, GLE=%x
\n
"
,
res
,
GetLastError
());
...
...
@@ -2339,6 +2349,7 @@ static void test_classesroot(void)
hklmsub2
=
0
;
res
=
RegOpenKeyExA
(
hklm
,
"subkey2"
,
0
,
KEY_QUERY_VALUE
|
KEY_SET_VALUE
,
&
hklmsub2
);
ok
(
res
==
ERROR_SUCCESS
,
"test key not found in hklm: %d
\n
"
,
res
);
ok
(
!
IS_HKCR
(
hklmsub2
),
"hkcr mask set in %p
\n
"
,
hklmsub2
);
/* check that the value is present in hklm */
res
=
RegQueryValueExA
(
hklmsub2
,
"subval1"
,
NULL
,
&
type
,
(
LPBYTE
)
buffer
,
&
size
);
...
...
@@ -2358,6 +2369,7 @@ static void test_classesroot(void)
ok
(
res
==
ERROR_FILE_NOT_FOUND
,
"test key found in user's classes: %d
\n
"
,
res
);
res
=
RegOpenKeyExA
(
hklm
,
"subkey1"
,
0
,
KEY_READ
,
&
hklmsub1
);
ok
(
res
==
ERROR_SUCCESS
,
"test key not found in hklm: %d
\n
"
,
res
);
ok
(
!
IS_HKCR
(
hklmsub1
),
"hkcr mask set in %p
\n
"
,
hklmsub1
);
/* delete subkey1 from hkcr again (which should now point at hklm) */
res
=
RegDeleteKey
(
hkcr
,
"subkey1"
);
...
...
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