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
ae313198
Commit
ae313198
authored
Sep 25, 2017
by
Hugh McMaster
Committed by
Alexandre Julliard
Sep 25, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg/tests: Test registry export with a simple data structure.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
43c16a25
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
3 deletions
+25
-3
reg.c
programs/reg/tests/reg.c
+25
-3
No files found.
programs/reg/tests/reg.c
View file @
ae313198
...
...
@@ -4255,10 +4255,18 @@ error:
static
void
test_export
(
void
)
{
LONG
err
;
DWORD
r
,
os_version
,
major_version
,
minor_version
;
DWORD
r
,
os_version
,
major_version
,
minor_version
,
dword
;
HKEY
hkey
;
const
char
*
empty_key_test
=
"
\xef\xbb\xbf
Windows Registry Editor Version 5.00
\r\n\r\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\r\n\r\n
"
;
const
char
*
empty_key_test
=
"
\xef\xbb\xbf
Windows Registry Editor Version 5.00
\r\n\r\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\r\n\r\n
"
;
const
char
*
simple_test
=
"
\xef\xbb\xbf
Windows Registry Editor Version 5.00
\r\n\r\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\r\n
"
"
\"
DWORD
\"
=dword:00000100
\r\n
"
"
\"
String
\"
=
\"
Your text here...
\"\r\n\r\n
"
;
err
=
RegDeleteKeyA
(
HKEY_CURRENT_USER
,
KEY_BASE
);
ok
(
err
==
ERROR_SUCCESS
||
err
==
ERROR_FILE_NOT_FOUND
,
"got %d
\n
"
,
err
);
...
...
@@ -4325,6 +4333,20 @@ static void test_export(void)
err
=
DeleteFileA
(
"file.reg"
);
todo_wine
ok
(
err
,
"DeleteFile failed: %u
\n
"
,
GetLastError
());
/* Test registry export with a simple data structure */
dword
=
0x100
;
add_value
(
hkey
,
"DWORD"
,
REG_DWORD
,
&
dword
,
sizeof
(
dword
));
add_value
(
hkey
,
"String"
,
REG_SZ
,
"Your text here..."
,
18
);
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
);
todo_wine
ok
(
compare_export
(
"file.reg"
,
simple_test
),
"compare_export() failed
\n
"
);
err
=
DeleteFileA
(
"file.reg"
);
todo_wine
ok
(
err
,
"DeleteFile failed: %u
\n
"
,
GetLastError
());
RegCloseKey
(
hkey
);
err
=
RegDeleteKeyA
(
HKEY_CURRENT_USER
,
KEY_BASE
);
ok
(
err
==
ERROR_SUCCESS
,
"RegDeleteKeyA failed: %d
\n
"
,
err
);
}
...
...
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