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
d37a49f3
Commit
d37a49f3
authored
May 17, 2017
by
Hugh McMaster
Committed by
Alexandre Julliard
May 17, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit/tests: Add tests for importing REG_BINARY data.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5aea192a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
2 deletions
+47
-2
regedit.c
programs/regedit/tests/regedit.c
+47
-2
No files found.
programs/regedit/tests/regedit.c
View file @
d37a49f3
...
...
@@ -189,6 +189,7 @@ static void test_basic_import(void)
WCHAR
wide_exp
[]
=
{
0x3041
,
'V'
,
'a'
,
'l'
,
'u'
,
'e'
,
0
};
LONG
lr
;
char
buffer
[
8
];
BYTE
hex
[
8
];
lr
=
RegDeleteKeyA
(
HKEY_CURRENT_USER
,
KEY_BASE
);
ok
(
lr
==
ERROR_SUCCESS
||
lr
==
ERROR_FILE_NOT_FOUND
,
...
...
@@ -318,7 +319,7 @@ static void test_basic_import(void)
dword
=
0x00000008
;
verify_reg
(
hkey
,
"single'quote"
,
REG_DWORD
,
&
dword
,
sizeof
(
dword
),
0
);
/* Test hex data concatenation for REG_NONE
and REG_EXPAND_SZ
*/
/* Test hex data concatenation for REG_NONE
, REG_EXPAND_SZ and REG_BINARY
*/
exec_import_str
(
"REGEDIT4
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\n
"
"
\"
Wine10a
\"
=hex(0):56,00,61,00,6c,00,75,00,65,00,00,00
\n
"
...
...
@@ -372,6 +373,28 @@ static void test_basic_import(void)
todo_wine
ok
(
size
==
6
||
broken
(
size
==
5
)
/* WinXP */
,
"got wrong size %u, expected 6
\n
"
,
size
);
todo_wine
ok
(
memcmp
(
buffer
,
"%PATH"
,
size
)
==
0
,
"got wrong data
\n
"
);
exec_import_str
(
"REGEDIT4
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\n
"
"
\"
Wine12a
\"
=hex:11,22,33,44,55,66,77,88
\n
"
"
\"
Wine12b
\"
=hex:11,22,33,44,
\\\n
"
" 55,66,77,88
\n
"
"
\"
Wine12c
\"
=hex:11,22,33,44,
\\
;comment
\n
"
" 55,66,
\\\n
"
" 77,88
\n
"
"
\"
Wine12d
\"
=hex:11,22,33,44,
\\
;comment
\n
"
" 55,66,
\n
"
" 77,88
\n
"
"
\"
Wine12e
\"
=hex:11,22,33,44,
\\
;comment
\n
"
" 55,66,;comment
\n
"
" 77,88
\n
"
);
hex
[
0
]
=
0x11
;
hex
[
1
]
=
0x22
;
hex
[
2
]
=
0x33
;
hex
[
3
]
=
0x44
;
hex
[
4
]
=
0x55
;
hex
[
5
]
=
0x66
;
hex
[
6
]
=
0x77
;
hex
[
7
]
=
0x88
;
verify_reg
(
hkey
,
"Wine12a"
,
REG_BINARY
,
hex
,
sizeof
(
hex
),
0
);
verify_reg
(
hkey
,
"Wine12b"
,
REG_BINARY
,
hex
,
sizeof
(
hex
),
0
);
todo_wine
verify_reg
(
hkey
,
"Wine12c"
,
REG_BINARY
,
hex
,
sizeof
(
hex
),
0
);
todo_wine
verify_reg
(
hkey
,
"Wine12d"
,
REG_BINARY
,
hex
,
6
,
0
);
todo_wine
verify_reg
(
hkey
,
"Wine12e"
,
REG_BINARY
,
hex
,
6
,
0
);
/* Test import with subkeys */
exec_import_str
(
"REGEDIT4
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"
\\
Subkey
\"
1]
\n
"
...
...
@@ -663,7 +686,7 @@ static void test_invalid_import(void)
todo_wine
verify_reg_nonexist
(
hkey
,
"Test18a"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Test18b"
);
/* Test hex data concatenation for REG_NONE
and REG_EXPAND_SZ
*/
/* Test hex data concatenation for REG_NONE
, REG_EXPAND_SZ and REG_BINARY
*/
exec_import_str
(
"REGEDIT4
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\n
"
"
\"
Test19a
\"
=hex(0):56,00,61,00,6c,00
\\\n
"
...
...
@@ -708,6 +731,28 @@ static void test_invalid_import(void)
todo_wine
verify_reg_nonexist
(
hkey
,
"Test20e"
);
verify_reg_nonexist
(
hkey
,
"Test20f"
);
exec_import_str
(
"REGEDIT4
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\n
"
"
\"
Test21a
\"
=hex:11,22,33,44
\\\n
"
",55,66,77,88
\n
"
"
\"
Test21b
\"
=hex:11,22,33,44
\\\n
"
" ,55,66,77,88
\n
"
"
\"
Test21c
\"
=hex:11,22,33,44
\\\n
"
" 55,66,77,88
\n
"
"
\"
Test21d
\"
=hex:11,22,33,4
\\\n
"
"4,55,66,77,88
\n
"
"
\"
Test21e
\"
=hex:11,22,33,4
\\\n
"
" 4,55,66,77,88
\n
"
"
\"
Test21f
\"
=hex:11,22,33,
\\
;comment
\n
"
" 44,55,66,
\\
#comment
\n
"
" 77,88
\n\n
"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Test21a"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Test21b"
);
verify_reg_nonexist
(
hkey
,
"Test21c"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Test21d"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Test21e"
);
verify_reg_nonexist
(
hkey
,
"Test21f"
);
RegCloseKey
(
hkey
);
lr
=
RegDeleteKeyA
(
HKEY_CURRENT_USER
,
KEY_BASE
);
...
...
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