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
326fa95e
Commit
326fa95e
authored
Sep 25, 2017
by
Hugh McMaster
Committed by
Alexandre Julliard
Sep 25, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit/tests: Use a helper function to delete registry values.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
03a9bf4f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
regedit.c
programs/regedit/tests/regedit.c
+11
-4
No files found.
programs/regedit/tests/regedit.c
View file @
326fa95e
...
...
@@ -241,6 +241,15 @@ static void add_value_(unsigned line, HKEY hkey, const char *name, DWORD type,
lok
(
lr
==
ERROR_SUCCESS
,
"RegSetValueExA failed: %d
\n
"
,
lr
);
}
#define delete_value(k,n) delete_value_(__LINE__,k,n)
static
void
delete_value_
(
unsigned
line
,
const
HKEY
hkey
,
const
char
*
name
)
{
LONG
lr
;
lr
=
RegDeleteValueA
(
hkey
,
name
);
lok
(
lr
==
ERROR_SUCCESS
,
"RegDeleteValueA failed: %d
\n
"
,
lr
);
}
#define KEY_BASE "Software\\Wine\\regedit_test"
static
void
test_basic_import
(
void
)
...
...
@@ -1532,8 +1541,7 @@ static void test_invalid_import(void)
verify_reg_nonexist
(
hkey
,
"Wine28c"
);
verify_reg
(
hkey
,
NULL
,
REG_SZ
,
"Default value 3"
,
16
,
0
);
lr
=
RegDeleteValueW
(
hkey
,
NULL
);
ok
(
lr
==
ERROR_SUCCESS
,
"RegDeleteValue failed: %u
\n
"
,
lr
);
delete_value
(
hkey
,
NULL
);
exec_import_str
(
"REGEDIT4
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\n
"
...
...
@@ -2037,8 +2045,7 @@ static void test_invalid_import_unicode(void)
verify_reg_nonexist
(
hkey
,
"Wine28c"
);
verify_reg
(
hkey
,
NULL
,
REG_SZ
,
"Default value 3"
,
16
,
0
);
lr
=
RegDeleteValueW
(
hkey
,
NULL
);
ok
(
lr
==
ERROR_SUCCESS
,
"RegDeleteValue failed: %u
\n
"
,
lr
);
delete_value
(
hkey
,
NULL
);
exec_import_wstr
(
"
\xef\xbb\xbf
Windows Registry Editor Version 5.00
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\n
"
...
...
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