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
23c93d30
Commit
23c93d30
authored
Jul 06, 2017
by
Hugh McMaster
Committed by
Alexandre Julliard
Jul 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit/tests: Add some more tests for importing hex data.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3afa0e42
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
67 additions
and
0 deletions
+67
-0
regedit.c
programs/regedit/tests/regedit.c
+67
-0
No files found.
programs/regedit/tests/regedit.c
View file @
23c93d30
...
...
@@ -500,6 +500,73 @@ static void test_basic_import(void)
if
(
lr
==
ERROR_SUCCESS
)
verify_reg
(
hkey
,
"Wine17"
,
REG_MULTI_SZ
,
"Line "
,
6
,
TODO_REG_SIZE
|
TODO_REG_DATA
);
exec_import_str
(
"REGEDIT4
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\n
"
"
\"
Wine18a
\"
=hex(7):4c,69,6e,65,00,00
\n
"
"
\"
Wine18b
\"
=hex(7):4c,69,6e,65,20,
\\\n
"
" 63,6f,6e,63,61,74,65,6e,61,74,69,6f,6e,00,00
\n
"
"
\"
Wine18c
\"
=hex(7):4c,69,6e,65,20,
\\
;comment
\n
"
" 63,6f,6e,63,61,74,
\\\n
"
" 65,6e,61,74,69,6f,6e,00,00
\n
"
"
\"
Wine18d
\"
=hex(7):4c,69,6e,65,20,
\\
;comment
\n
"
" 63,6f,6e,63,61,74,
\n
"
" 65,6e,61,74,69,6f,6e,00,00
\n
"
"
\"
Wine18e
\"
=hex(7):4c,69,6e,65,20,
\\\n
"
" 63,6f,6e,63,61,74,;comment
\n
"
" 65,6e,61,74,69,6f,6e,00,00
\n\n
"
);
verify_reg
(
hkey
,
"Wine18a"
,
REG_MULTI_SZ
,
"Line
\0
"
,
6
,
0
);
verify_reg
(
hkey
,
"Wine18b"
,
REG_MULTI_SZ
,
"Line concatenation
\0
"
,
20
,
0
);
verify_reg
(
hkey
,
"Wine18c"
,
REG_MULTI_SZ
,
"Line concatenation
\0
"
,
20
,
0
);
verify_reg
(
hkey
,
"Wine18d"
,
REG_MULTI_SZ
,
"Line concat"
,
12
,
TODO_REG_SIZE
);
todo_wine
verify_reg
(
hkey
,
"Wine18e"
,
REG_MULTI_SZ
,
"Line concat"
,
12
,
0
);
exec_import_str
(
"REGEDIT4
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\n
"
"
\"
Wine19a
\"
=hex(100):25,50,41,54,48,25,00
\n
"
"
\"
Wine19b
\"
=hex(100):25,50,41,
\\\n
"
" 54,48,25,00
\n
"
"
\"
Wine19c
\"
=hex(100):25,50,41,
\\
;comment
\n
"
" 54,48,
\\\n
"
" 25,00
\n
"
"
\"
Wine19d
\"
=hex(100):25,50,41,
\\
;comment
\n
"
" 54,48,
\n
"
" 25,00
\n
"
"
\"
Wine19e
\"
=hex(100):25,50,41,
\\
;comment
\n
"
" 54,48,;comment
\n
"
" 25,00
\n
"
);
verify_reg
(
hkey
,
"Wine19a"
,
0x100
,
"%PATH%"
,
7
,
0
);
verify_reg
(
hkey
,
"Wine19b"
,
0x100
,
"%PATH%"
,
7
,
0
);
verify_reg
(
hkey
,
"Wine19c"
,
0x100
,
"%PATH%"
,
7
,
0
);
verify_reg
(
hkey
,
"Wine19d"
,
0x100
,
"%PATH"
,
5
,
0
);
todo_wine
verify_reg
(
hkey
,
"Wine19e"
,
0x100
,
"%PATH"
,
5
,
0
);
/* Test null-termination of REG_EXPAND_SZ and REG_MULTI_SZ data*/
exec_import_str
(
"REGEDIT4
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\n
"
"
\"
Wine20a
\"
=hex(7):4c,69,6e,65
\n
"
"
\"
Wine20b
\"
=hex(7):4c,69,6e,65,
\n
"
"
\"
Wine20c
\"
=hex(7):4c,69,6e,65,00
\n
"
"
\"
Wine20d
\"
=hex(7):4c,69,6e,65,00,
\n
"
"
\"
Wine20e
\"
=hex(7):4c,69,6e,65,00,00
\n
"
"
\"
Wine20f
\"
=hex(7):4c,69,6e,65,00,00,
\n\n
"
);
verify_reg
(
hkey
,
"Wine20a"
,
REG_MULTI_SZ
,
"Line"
,
5
,
TODO_REG_SIZE
);
verify_reg
(
hkey
,
"Wine20b"
,
REG_MULTI_SZ
,
"Line"
,
5
,
TODO_REG_SIZE
);
verify_reg
(
hkey
,
"Wine20c"
,
REG_MULTI_SZ
,
"Line"
,
5
,
0
);
verify_reg
(
hkey
,
"Wine20d"
,
REG_MULTI_SZ
,
"Line"
,
5
,
0
);
verify_reg
(
hkey
,
"Wine20e"
,
REG_MULTI_SZ
,
"Line
\0
"
,
6
,
0
);
verify_reg
(
hkey
,
"Wine20f"
,
REG_MULTI_SZ
,
"Line
\0
"
,
6
,
0
);
exec_import_str
(
"REGEDIT4
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\n
"
"
\"
Wine21a
\"
=hex(2):25,50,41,54,48,25
\n
"
"
\"
Wine21b
\"
=hex(2):25,50,41,54,48,25,
\n
"
"
\"
Wine21c
\"
=hex(2):25,50,41,54,48,25,00
\n
"
"
\"
Wine21d
\"
=hex(2):25,50,41,54,48,25,00,
\n\n
"
);
verify_reg
(
hkey
,
"Wine21a"
,
REG_EXPAND_SZ
,
"%PATH%"
,
7
,
TODO_REG_SIZE
);
verify_reg
(
hkey
,
"Wine21b"
,
REG_EXPAND_SZ
,
"%PATH%"
,
7
,
TODO_REG_SIZE
);
verify_reg
(
hkey
,
"Wine21c"
,
REG_EXPAND_SZ
,
"%PATH%"
,
7
,
0
);
verify_reg
(
hkey
,
"Wine21d"
,
REG_EXPAND_SZ
,
"%PATH%"
,
7
,
0
);
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