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
8ef6091c
Commit
8ef6091c
authored
May 17, 2017
by
Hugh McMaster
Committed by
Alexandre Julliard
May 18, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg/tests: Add tests for importing REG_NONE data.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0760cd01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
82 additions
and
0 deletions
+82
-0
reg.c
programs/reg/tests/reg.c
+82
-0
No files found.
programs/reg/tests/reg.c
View file @
8ef6091c
...
@@ -1428,6 +1428,47 @@ static void test_import(void)
...
@@ -1428,6 +1428,47 @@ static void test_import(void)
todo_wine
verify_reg
(
hkey
,
"Wine42b"
,
REG_SZ
,
"Value 2"
,
8
,
0
);
todo_wine
verify_reg
(
hkey
,
"Wine42b"
,
REG_SZ
,
"Value 2"
,
8
,
0
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine42c"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine42c"
);
/* Test hex data concatenation for REG_NONE */
test_import_str
(
"REGEDIT4
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\n
"
"
\"
Wine43a
\"
=hex(0):56,00,61,00,6c,00,75,00,65,00,00,00
\n
"
"
\"
Wine43b
\"
=hex(0):56,00,61,00,6c,00,
\\\n
"
" 75,00,65,00,00,00
\n
"
"
\"
Wine43c
\"
=hex(0):56,00,61,00,6c,00
\\\n
"
",75,00,65,00,00,00
\n
"
"
\"
Wine43d
\"
=hex(0):56,00,61,00,6c,00
\\\n
"
" ,75,00,65,00,00,00
\n
"
"
\"
Wine43e
\"
=hex(0):56,00,61,00,6c,00
\\\n
"
" 75,00,65,00,00,00
\n
"
"
\"
Wine43f
\"
=hex(0):56,00,61,00,6c,00,7
\\\n
"
"5,00,65,00,00,00
\n
"
"
\"
Wine43g
\"
=hex(0):56,00,61,00,6c,00,7
\\\n
"
" 5,00,65,00,00,00
\\\n
"
"
\"
Wine43h
\"
=hex(0):56,00,61,00,
\\
;comment
\n
"
" 6c,00,75,00,
\\\n
"
" 65,00,00,00
\n
"
"
\"
Wine43i
\"
=hex(0):56,00,61,00,
\\
;comment
\n
"
" 6c,00,75,00,
\n
"
" 65,00,00,00
\n
"
"
\"
Wine43j
\"
=hex(0):56,00,61,00,
\\
;comment
\n
"
" 6c,00,75,00,;comment
\n
"
" 65,00,00,00
\n
"
"
\"
Wine43k
\"
=hex(0):56,00,61,00,
\\
;comment
\n
"
" 6c,00,75,00,
\\
#comment
\n
"
" 65,00,00,00
\n\n
"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
todo_wine
verify_reg
(
hkey
,
"Wine43a"
,
REG_NONE
,
"V
\0
a
\0
l
\0
u
\0
e
\0\0
"
,
12
,
0
);
todo_wine
verify_reg
(
hkey
,
"Wine43b"
,
REG_NONE
,
"V
\0
a
\0
l
\0
u
\0
e
\0\0
"
,
12
,
0
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine43c"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine43d"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine43e"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine43f"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine43g"
);
todo_wine
verify_reg
(
hkey
,
"Wine43h"
,
REG_NONE
,
"V
\0
a
\0
l
\0
u
\0
e
\0\0
"
,
12
,
0
);
todo_wine
verify_reg
(
hkey
,
"Wine43i"
,
REG_NONE
,
"V
\0
a
\0
l
\0
u
\0
e
\0\0
"
,
8
,
0
);
todo_wine
verify_reg
(
hkey
,
"Wine43j"
,
REG_NONE
,
"V
\0
a
\0
l
\0
u
\0
e
\0\0
"
,
8
,
0
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine43k"
);
/* Test import with subkeys */
/* Test import with subkeys */
test_import_str
(
"REGEDIT4
\n\n
"
test_import_str
(
"REGEDIT4
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"
\\
Subkey
\"
1]
\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"
\\
Subkey
\"
1]
\n
"
...
@@ -2075,6 +2116,47 @@ static void test_import(void)
...
@@ -2075,6 +2116,47 @@ static void test_import(void)
todo_wine
verify_reg
(
hkey
,
"Wine42b"
,
REG_SZ
,
"Value 2"
,
8
,
0
);
todo_wine
verify_reg
(
hkey
,
"Wine42b"
,
REG_SZ
,
"Value 2"
,
8
,
0
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine42c"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine42c"
);
/* Test hex data concatenation for REG_NONE */
test_import_wstr
(
"
\xef\xbb\xbf
Windows Registry Editor Version 5.00
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\n
"
"
\"
Wine43a
\"
=hex(0):56,00,61,00,6c,00,75,00,65,00,00,00
\n
"
"
\"
Wine43b
\"
=hex(0):56,00,61,00,6c,00,
\\\n
"
" 75,00,65,00,00,00
\n
"
"
\"
Wine43c
\"
=hex(0):56,00,61,00,6c,00
\\\n
"
",75,00,65,00,00,00
\n
"
"
\"
Wine43d
\"
=hex(0):56,00,61,00,6c,00
\\\n
"
" ,75,00,65,00,00,00
\n
"
"
\"
Wine43e
\"
=hex(0):56,00,61,00,6c,00
\\\n
"
" 75,00,65,00,00,00
\n
"
"
\"
Wine43f
\"
=hex(0):56,00,61,00,6c,00,7
\\\n
"
"5,00,65,00,00,00
\n
"
"
\"
Wine43g
\"
=hex(0):56,00,61,00,6c,00,7
\\\n
"
" 5,00,65,00,00,00
\\\n
"
"
\"
Wine43h
\"
=hex(0):56,00,61,00,
\\
;comment
\n
"
" 6c,00,75,00,
\\\n
"
" 65,00,00,00
\n
"
"
\"
Wine43i
\"
=hex(0):56,00,61,00,
\\
;comment
\n
"
" 6c,00,75,00,
\n
"
" 65,00,00,00
\n
"
"
\"
Wine43j
\"
=hex(0):56,00,61,00,
\\
;comment
\n
"
" 6c,00,75,00,;comment
\n
"
" 65,00,00,00
\n
"
"
\"
Wine43k
\"
=hex(0):56,00,61,00,
\\
;comment
\n
"
" 6c,00,75,00,
\\
#comment
\n
"
" 65,00,00,00
\n\n
"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
todo_wine
verify_reg
(
hkey
,
"Wine43a"
,
REG_NONE
,
"V
\0
a
\0
l
\0
u
\0
e
\0\0
"
,
12
,
0
);
todo_wine
verify_reg
(
hkey
,
"Wine43b"
,
REG_NONE
,
"V
\0
a
\0
l
\0
u
\0
e
\0\0
"
,
12
,
0
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine43c"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine43d"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine43e"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine43f"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine43g"
);
todo_wine
verify_reg
(
hkey
,
"Wine43h"
,
REG_NONE
,
"V
\0
a
\0
l
\0
u
\0
e
\0\0
"
,
12
,
0
);
todo_wine
verify_reg
(
hkey
,
"Wine43i"
,
REG_NONE
,
"V
\0
a
\0
l
\0
u
\0
e
\0\0
"
,
8
,
0
);
todo_wine
verify_reg
(
hkey
,
"Wine43j"
,
REG_NONE
,
"V
\0
a
\0
l
\0
u
\0
e
\0\0
"
,
8
,
0
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine43k"
);
/* Test import with subkeys */
/* Test import with subkeys */
test_import_wstr
(
"
\xef\xbb\xbf
Windows Registry Editor Version 5.00
\n\n
"
test_import_wstr
(
"
\xef\xbb\xbf
Windows Registry Editor Version 5.00
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"
\\
Subkey
\"
1]
\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"
\\
Subkey
\"
1]
\n
"
...
...
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