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
fdb452f8
Commit
fdb452f8
authored
Jun 23, 2017
by
Hugh McMaster
Committed by
Alexandre Julliard
Jun 23, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg/tests: Add tests to determine the effects of backslashes in hex data.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
86400f72
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
0 deletions
+66
-0
reg.c
programs/reg/tests/reg.c
+66
-0
No files found.
programs/reg/tests/reg.c
View file @
fdb452f8
...
...
@@ -1798,6 +1798,39 @@ static void test_import(void)
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine51a"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine51b"
);
/* Test the effect of backslashes in hex data */
test_import_str
(
"REGEDIT4
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\n
"
"
\"
Wine52a
\"
=hex(2):25,48
\\
,4f,4d,45,25,00
\n
"
"
\"
Wine52b
\"
=hex(2):25,48,
\\
4f,4d,45,25,00
\n
"
"
\"
Wine52c
\"
=hex(2):25,48
\\
,4f,4d,45,25,00
\n
"
"
\"
Wine52d
\"
=hex(2):25,48,
\\
4f,4d,45,25,00
\n
"
"
\"
Wine52e
\"
=hex(2):
\\
25,48,4f,4d,45,25,00
\n
"
"
\"
Wine52f
\"
=hex(2):
\\
25,48,4f,4d,45,25,00
\n
"
"
\"
Wine52g
\"
=hex(2):25,48,4
\\
f,4d,45,25,00
\n
"
"
\"
Wine52h
\"
=hex(2):25,48,4
\\\n
"
" f,4d,45,25,00
\n
"
"
\"
Wine52i
\"
=hex(2):25,50,
\\
,41,54,48,25,00
\n
"
"
\"
Wine52j
\"
=hex(2):25,48,4f,4d,45,25,5c,
\\\\\n
"
" 25,50,41,54,48,25,00
\n
"
"
\"
Wine52k
\"
=hex(2):,
\\\n
"
" 25,48,4f,4d,45,25,00
\n
"
"
\"
Wine52l
\"
=hex(2):
\\\n
"
" 25,48,4f,4d,45,25,00
\n\n
"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine52a"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine52b"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine52c"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine52d"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine52e"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine52f"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine52g"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine52h"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine52i"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine52j"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine52k"
);
todo_wine
verify_reg
(
hkey
,
"Wine52l"
,
REG_EXPAND_SZ
,
"%HOME%"
,
7
,
0
);
err
=
RegCloseKey
(
hkey
);
todo_wine
ok
(
err
==
ERROR_SUCCESS
,
"got %d, expected 0
\n
"
,
err
);
...
...
@@ -2766,6 +2799,39 @@ static void test_import(void)
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine51a"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine51b"
);
/* Test the effect of backslashes in hex data */
test_import_wstr
(
"
\xef\xbb\xbf
Windows Registry Editor Version 5.00
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\n
"
"
\"
Wine52a
\"
=hex(2):25,00,48
\\
,00,4f,00,4d,00,45,00,25,00,00,00
\n
"
"
\"
Wine52b
\"
=hex(2):25,00,48,00,
\\
4f,00,4d,00,45,00,25,00,00,00
\n
"
"
\"
Wine52c
\"
=hex(2):25,00,48
\\
,00,4f,00,4d,00,45,00,25,00,00,00
\n
"
"
\"
Wine52d
\"
=hex(2):25,00,48,00,
\\
4f,00,4d,00,45,00,25,00,00,00
\n
"
"
\"
Wine52e
\"
=hex(2):
\\
25,00,48,00,4f,00,4d,00,45,00,25,00,00,00
\n
"
"
\"
Wine52f
\"
=hex(2):
\\
25,00,48,00,4f,00,4d,00,45,00,25,00,00,00
\n
"
"
\"
Wine52g
\"
=hex(2):25,00,48,00,4
\\
f,00,4d,00,45,00,25,00,00,00
\n
"
"
\"
Wine52h
\"
=hex(2):25,00,48,00,4
\\\n
"
" f,00,4d,00,45,00,25,00,00,00
\n
"
"
\"
Wine52i
\"
=hex(2):25,00,50,00,
\\
,41,00,54,00,48,00,25,00,00,00
\n
"
"
\"
Wine52j
\"
=hex(2):25,00,48,00,4f,00,4d,00,45,00,25,00,5c,00,
\\\\\n
"
" 25,00,50,00,41,00,54,00,48,00,25,00,00,00
\n
"
"
\"
Wine52k
\"
=hex(2):,
\\\n
"
" 25,00,48,00,4f,00,4d,00,45,00,25,00,00,00
\n
"
"
\"
Wine52l
\"
=hex(2):
\\\n
"
" 25,00,48,00,4f,00,4d,00,45,00,25,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_nonexist
(
hkey
,
"Wine52a"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine52b"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine52c"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine52d"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine52e"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine52f"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine52g"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine52h"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine52i"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine52j"
);
todo_wine
verify_reg_nonexist
(
hkey
,
"Wine52k"
);
todo_wine
verify_reg
(
hkey
,
"Wine52l"
,
REG_EXPAND_SZ
,
"%HOME%"
,
7
,
0
);
err
=
RegCloseKey
(
hkey
);
todo_wine
ok
(
err
==
ERROR_SUCCESS
,
"got %d, expected 0
\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