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
53fd4df8
Commit
53fd4df8
authored
Mar 10, 2021
by
Hugh McMaster
Committed by
Alexandre Julliard
Mar 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg/tests: Try exporting registry values with escaped null characters.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1c2b9669
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
export.c
programs/reg/tests/export.c
+25
-0
No files found.
programs/reg/tests/export.c
View file @
53fd4df8
...
...
@@ -168,6 +168,16 @@ static void test_export(void)
"
\"\\\\
foo
\\\\
bar
\"
=
\"\"\r\n\r\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"
\\
https://winehq.org]
\r\n\r\n
"
;
const
char
*
escaped_null_test
=
"
\xef\xbb\xbf
Windows Registry Editor Version 5.00
\r\n\r\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\r\n
"
"
\"
Wine5a
\"
=
\"\\\\
0
\"\r\n
"
"
\"
Wine5b
\"
=
\"\\\\
0
\\\\
0
\"\r\n
"
"
\"
Wine5c
\"
=
\"
Value1
\\\\
0
\"\r\n
"
"
\"
Wine5d
\"
=
\"
Value2
\\\\
0
\\\\
0
\\\\
0
\\\\
0
\"\r\n
"
"
\"
Wine5e
\"
=
\"
Value3
\\\\
0Value4
\"\r\n
"
"
\"
Wine5f
\"
=
\"\\\\
0Value5
\"\r\n\r\n
"
;
delete_tree
(
HKEY_CURRENT_USER
,
KEY_BASE
);
verify_key_nonexist
(
HKEY_CURRENT_USER
,
KEY_BASE
);
...
...
@@ -402,6 +412,21 @@ static void test_export(void)
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
ok
(
compare_export
(
"file.reg"
,
slashes_test
,
TODO_REG_COMPARE
),
"compare_export() failed
\n
"
);
delete_tree
(
HKEY_CURRENT_USER
,
KEY_BASE
);
/* Test escaped null characters */
add_key
(
HKEY_CURRENT_USER
,
KEY_BASE
,
&
hkey
);
add_value
(
hkey
,
"Wine5a"
,
REG_SZ
,
"
\\
0"
,
3
);
add_value
(
hkey
,
"Wine5b"
,
REG_SZ
,
"
\\
0
\\
0"
,
5
);
add_value
(
hkey
,
"Wine5c"
,
REG_SZ
,
"Value1
\\
0"
,
9
);
add_value
(
hkey
,
"Wine5d"
,
REG_SZ
,
"Value2
\\
0
\\
0
\\
0
\\
0"
,
15
);
add_value
(
hkey
,
"Wine5e"
,
REG_SZ
,
"Value3
\\
0Value4"
,
15
);
add_value
(
hkey
,
"Wine5f"
,
REG_SZ
,
"
\\
0Value5"
,
9
);
close_key
(
hkey
);
run_reg_exe
(
"reg export HKEY_CURRENT_USER
\\
"
KEY_BASE
" file.reg /y"
,
&
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
ok
(
compare_export
(
"file.reg"
,
escaped_null_test
,
0
),
"compare_export() failed
\n
"
);
delete_tree
(
HKEY_CURRENT_USER
,
KEY_BASE
);
}
START_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