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
41236123
Commit
41236123
authored
Sep 06, 2017
by
Hugh McMaster
Committed by
Alexandre Julliard
Sep 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg/tests: Add basic tests for the export operation.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0d078dbc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
0 deletions
+43
-0
reg.c
programs/reg/tests/reg.c
+43
-0
No files found.
programs/reg/tests/reg.c
View file @
41236123
...
...
@@ -4223,6 +4223,48 @@ static void test_import_31(void)
ok
(
err
==
ERROR_SUCCESS
,
"RegDeleteKeyA failed: %d
\n
"
,
err
);
}
static
void
test_export
(
void
)
{
LONG
err
;
DWORD
r
;
err
=
RegDeleteKeyA
(
HKEY_CURRENT_USER
,
KEY_BASE
);
ok
(
err
==
ERROR_SUCCESS
||
err
==
ERROR_FILE_NOT_FOUND
,
"got %d
\n
"
,
err
);
run_reg_exe
(
"reg export"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %d, expected 1
\n
"
,
r
);
run_reg_exe
(
"reg export /?"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
run_reg_exe
(
"reg export
\\
remote-pc
\\
HKLM
\\
Wine file.reg"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %d, expected 1
\n
"
,
r
);
run_reg_exe
(
"reg export HKEY_DYN_DATA file.reg"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %d, expected 1
\n
"
,
r
);
run_reg_exe
(
"reg export HKDD 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
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %d, expected 1
\n
"
,
r
);
run_reg_exe
(
"reg export file.reg"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %d, expected 1
\n
"
,
r
);
run_reg_exe
(
"reg export file.reg HKEY_CURRENT_USER
\\
"
KEY_BASE
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %d, expected 1
\n
"
,
r
);
run_reg_exe
(
"reg export HKEY_CURRENT_USER
\\
"
KEY_BASE
,
&
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"
,
&
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 file2.reg"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %d, expected 1
\n
"
,
r
);
}
START_TEST
(
reg
)
{
DWORD
r
;
...
...
@@ -4240,4 +4282,5 @@ START_TEST(reg)
test_import_with_whitespace
();
test_unicode_import_with_whitespace
();
test_import_31
();
test_export
();
}
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