Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
959ea667
Commit
959ea667
authored
Jul 15, 2021
by
Hugh McMaster
Committed by
Alexandre Julliard
Jul 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg/tests: Split 'export' syntax tests into a separate function.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fee69217
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
export.c
programs/reg/tests/export.c
+14
-5
No files found.
programs/reg/tests/export.c
View file @
959ea667
...
...
@@ -168,12 +168,9 @@ const char *escaped_null_test =
/* Unit tests */
static
void
test_
export
(
void
)
static
void
test_
command_syntax
(
void
)
{
LONG
err
;
DWORD
r
,
dword
,
type
,
size
;
HKEY
hkey
,
subkey
;
BYTE
hex
[
4
],
buffer
[
8
];
DWORD
r
;
delete_tree
(
HKEY_CURRENT_USER
,
KEY_BASE
,
0
);
...
...
@@ -210,6 +207,7 @@ static void test_export(void)
run_reg_exe
(
"reg export HKEY_CURRENT_USER
\\
"
KEY_BASE
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %d, expected 1
\n
"
,
r
);
/* This test fails because the registry key doesn't exist */
run_reg_exe
(
"reg export HKEY_CURRENT_USER
\\
"
KEY_BASE
" file.reg"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %d, expected 1
\n
"
,
r
);
...
...
@@ -224,6 +222,16 @@ static void test_export(void)
run_reg_exe
(
"reg export HKEY_CURRENT_USER
\\
"
KEY_BASE
" file.reg /reg:64 /reg:64"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %d, expected 1
\n
"
,
r
);
}
static
void
test_export
(
void
)
{
LONG
err
;
DWORD
r
,
dword
,
type
,
size
;
HKEY
hkey
,
subkey
;
BYTE
hex
[
4
],
buffer
[
8
];
delete_tree
(
HKEY_CURRENT_USER
,
KEY_BASE
,
0
);
/* Test registry export with an empty key */
add_key
(
HKEY_CURRENT_USER
,
KEY_BASE
,
0
,
&
hkey
);
...
...
@@ -591,6 +599,7 @@ START_TEST(export)
return
;
}
test_command_syntax
();
test_export
();
/* Check if reg.exe is running with elevated privileges */
...
...
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