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
f886f9f3
Commit
f886f9f3
authored
Sep 18, 2017
by
Hugh McMaster
Committed by
Alexandre Julliard
Sep 18, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg/tests: Test the placement of the overwrite file flag [/y].
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bfe5fed0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
1 deletion
+32
-1
reg.c
programs/reg/tests/reg.c
+32
-1
No files found.
programs/reg/tests/reg.c
View file @
f886f9f3
...
...
@@ -4213,7 +4213,8 @@ static void test_import_31(void)
static
void
test_export
(
void
)
{
LONG
err
;
DWORD
r
;
DWORD
r
,
os_version
,
major_version
,
minor_version
;
HKEY
hkey
;
err
=
RegDeleteKeyA
(
HKEY_CURRENT_USER
,
KEY_BASE
);
ok
(
err
==
ERROR_SUCCESS
||
err
==
ERROR_FILE_NOT_FOUND
,
"got %d
\n
"
,
err
);
...
...
@@ -4250,6 +4251,36 @@ static void test_export(void)
run_reg_exe
(
"reg export HKEY_CURRENT_USER
\\
"
KEY_BASE
" file.reg file2.reg"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %d, expected 1
\n
"
,
r
);
/* Test registry export with an empty key */
add_key
(
HKEY_CURRENT_USER
,
KEY_BASE
,
&
hkey
);
run_reg_exe
(
"reg export HKEY_CURRENT_USER
\\
"
KEY_BASE
" file.reg"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
os_version
=
GetVersion
();
major_version
=
LOBYTE
(
LOWORD
(
os_version
));
minor_version
=
HIBYTE
(
LOWORD
(
os_version
));
if
(
major_version
>
5
||
(
major_version
==
5
&&
minor_version
==
2
))
{
run_reg_exe
(
"reg export /y HKEY_CURRENT_USER
\\
"
KEY_BASE
" file.reg"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %d, expected 1
\n
"
,
r
);
run_reg_exe
(
"reg export HKEY_CURRENT_USER
\\
"
KEY_BASE
" /y file.reg"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %d, expected 1
\n
"
,
r
);
run_reg_exe
(
"reg export HKEY_CURRENT_USER
\\
"
KEY_BASE
" file.reg /y"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
}
else
/* Windows XP (32-bit) and older */
win_skip
(
"File overwrite flag [/y] not supported; skipping position tests
\n
"
);
err
=
DeleteFileA
(
"file.reg"
);
todo_wine
ok
(
err
,
"DeleteFile failed: %u
\n
"
,
GetLastError
());
err
=
RegDeleteKeyA
(
HKEY_CURRENT_USER
,
KEY_BASE
);
ok
(
err
==
ERROR_SUCCESS
,
"RegDeleteKeyA failed: %d
\n
"
,
err
);
}
START_TEST
(
reg
)
...
...
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