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
37235a9b
Commit
37235a9b
authored
Mar 31, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Apr 01, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Add tests for registry keys that have been deleted.
parent
60f736af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
registry.c
dlls/advapi32/tests/registry.c
+36
-0
No files found.
dlls/advapi32/tests/registry.c
View file @
37235a9b
...
...
@@ -1910,6 +1910,41 @@ static void test_redirection(void)
RegCloseKey
(
root64
);
}
static
void
test_deleted_key
(
void
)
{
HKEY
hkey
,
hkey2
;
char
value
[
20
];
DWORD
val_count
,
type
;
LONG
res
;
/* Open the test key, then delete it while it's open */
RegOpenKeyA
(
HKEY_CURRENT_USER
,
"Software
\\
Wine
\\
Test"
,
&
hkey
);
delete_key
(
hkey_main
);
val_count
=
20
;
type
=
0
;
res
=
RegEnumValueA
(
hkey
,
0
,
value
,
&
val_count
,
NULL
,
&
type
,
0
,
0
);
todo_wine
ok
(
res
==
ERROR_KEY_DELETED
,
"expect ERROR_KEY_DELETED, got %i
\n
"
,
res
);
res
=
RegSetValueExA
(
hkey
,
"test"
,
0
,
REG_SZ
,
(
const
BYTE
*
)
"value"
,
6
);
todo_wine
ok
(
res
==
ERROR_KEY_DELETED
,
"expect ERROR_KEY_DELETED, got %i
\n
"
,
res
);
res
=
RegOpenKeyA
(
hkey
,
"test"
,
&
hkey2
);
todo_wine
ok
(
res
==
ERROR_KEY_DELETED
,
"expect ERROR_KEY_DELETED, got %i
\n
"
,
res
);
if
(
res
==
0
)
RegCloseKey
(
hkey2
);
res
=
RegCreateKeyA
(
hkey
,
"test"
,
&
hkey2
);
ok
(
res
==
ERROR_KEY_DELETED
,
"expect ERROR_KEY_DELETED, got %i
\n
"
,
res
);
if
(
res
==
0
)
RegCloseKey
(
hkey2
);
RegCloseKey
(
hkey
);
setup_main_key
();
}
START_TEST
(
registry
)
{
/* Load pointers for functions that are not available in all Windows versions */
...
...
@@ -1944,6 +1979,7 @@ START_TEST(registry)
test_reg_delete_tree
();
test_rw_order
();
test_deleted_key
();
/* cleanup */
delete_key
(
hkey_main
);
...
...
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