Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
4a6fb941
Commit
4a6fb941
authored
Oct 05, 2017
by
Hugh McMaster
Committed by
Alexandre Julliard
Oct 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg/tests: Test the importing of hex values with no data.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4236c470
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
2 deletions
+41
-2
reg.c
programs/reg/tests/reg.c
+41
-2
No files found.
programs/reg/tests/reg.c
View file @
4a6fb941
...
...
@@ -78,8 +78,11 @@ static void verify_reg_(unsigned line, HKEY hkey, const char* value,
lok
(
type
==
exp_type
,
"got wrong type %d, expected %d
\n
"
,
type
,
exp_type
);
todo_wine_if
(
todo
&
TODO_REG_SIZE
)
lok
(
size
==
exp_size
,
"got wrong size %d, expected %d
\n
"
,
size
,
exp_size
);
todo_wine_if
(
todo
&
TODO_REG_DATA
)
lok
(
memcmp
(
data
,
exp_data
,
size
)
==
0
,
"got wrong data
\n
"
);
if
(
exp_data
)
{
todo_wine_if
(
todo
&
TODO_REG_DATA
)
lok
(
memcmp
(
data
,
exp_data
,
size
)
==
0
,
"got wrong data
\n
"
);
}
}
#define verify_reg_nonexist(k,v) verify_reg_nonexist_(__LINE__,k,v)
...
...
@@ -2343,6 +2346,24 @@ static void test_import(void)
verify_reg
(
hkey
,
"Wine67c"
,
REG_EXPAND_SZ
,
"%PATH%"
,
7
,
0
);
verify_reg
(
hkey
,
"Wine67d"
,
REG_EXPAND_SZ
,
"%PATH%"
,
7
,
0
);
test_import_str
(
"REGEDIT4
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\n
"
"
\"
Wine68a
\"
=hex(1):
\n
"
"
\"
Wine68b
\"
=hex(2):
\n
"
"
\"
Wine68c
\"
=hex(3):
\n
"
"
\"
Wine68d
\"
=hex(4):
\n
"
"
\"
Wine68e
\"
=hex(7):
\n
"
"
\"
Wine68f
\"
=hex(100):
\n
"
"
\"
Wine68g
\"
=hex(abcd):
\n\n
"
,
&
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
verify_reg
(
hkey
,
"Wine68a"
,
REG_SZ
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68b"
,
REG_EXPAND_SZ
,
NULL
,
0
,
TODO_REG_SIZE
);
verify_reg
(
hkey
,
"Wine68c"
,
REG_BINARY
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68d"
,
REG_DWORD
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68e"
,
REG_MULTI_SZ
,
NULL
,
0
,
TODO_REG_SIZE
);
verify_reg
(
hkey
,
"Wine68f"
,
0x100
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68g"
,
0xabcd
,
NULL
,
0
,
0
);
err
=
RegCloseKey
(
hkey
);
ok
(
err
==
ERROR_SUCCESS
,
"got %d, expected 0
\n
"
,
err
);
...
...
@@ -3823,6 +3844,24 @@ static void test_unicode_import(void)
verify_reg
(
hkey
,
"Wine67c"
,
REG_EXPAND_SZ
,
"%PATH%"
,
7
,
0
);
verify_reg
(
hkey
,
"Wine67d"
,
REG_EXPAND_SZ
,
"%PATH%"
,
7
,
0
);
test_import_wstr
(
"
\xef\xbb\xbf
Windows Registry Editor Version 5.00
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\n
"
"
\"
Wine68a
\"
=hex(1):
\n
"
"
\"
Wine68b
\"
=hex(2):
\n
"
"
\"
Wine68c
\"
=hex(3):
\n
"
"
\"
Wine68d
\"
=hex(4):
\n
"
"
\"
Wine68e
\"
=hex(7):
\n
"
"
\"
Wine68f
\"
=hex(100):
\n
"
"
\"
Wine68g
\"
=hex(abcd):
\n\n
"
,
&
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
verify_reg
(
hkey
,
"Wine68a"
,
REG_SZ
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68b"
,
REG_EXPAND_SZ
,
NULL
,
0
,
TODO_REG_SIZE
);
verify_reg
(
hkey
,
"Wine68c"
,
REG_BINARY
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68d"
,
REG_DWORD
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68e"
,
REG_MULTI_SZ
,
NULL
,
0
,
TODO_REG_SIZE
);
verify_reg
(
hkey
,
"Wine68f"
,
0x100
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68g"
,
0xabcd
,
NULL
,
0
,
0
);
err
=
RegCloseKey
(
hkey
);
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