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
90dcfadf
Commit
90dcfadf
authored
Oct 23, 2014
by
Jonathan Vollebregt
Committed by
Alexandre Julliard
Oct 24, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg/tests: Add REG_BINARY tests for reg add.
parent
53a5a837
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
reg.c
programs/reg/tests/reg.c
+33
-0
No files found.
programs/reg/tests/reg.c
View file @
90dcfadf
...
...
@@ -158,6 +158,39 @@ static void test_add(void)
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %u
\n
"
,
r
);
verify_reg
(
hkey
,
"expand3"
,
REG_EXPAND_SZ
,
""
,
1
,
TODO_REG_SIZE
);
/* REG_BINARY */
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /t REG_BINARY /v bin0 /f"
,
&
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %u
\n
"
,
r
);
verify_reg
(
hkey
,
"bin0"
,
REG_BINARY
,
buffer
,
0
,
0
);
run_reg_exe
(
"reg add HKEY_CURRENT_USER
\\
"
KEY_BASE
" /ve /t REG_BINARY /d deadbeef /f"
,
&
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %u
\n
"
,
r
);
dword
=
0xefbeadde
;
verify_reg
(
hkey
,
""
,
REG_BINARY
,
&
dword
,
sizeof
(
DWORD
),
TODO_REG_SIZE
);
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /t REG_BINARY /v bin1 /f /d 0xDeAdBeEf"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %u
\n
"
,
r
);
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /t REG_BINARY /v bin2 /f /d x01"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %u
\n
"
,
r
);
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /t REG_BINARY /v bin3 /f /d 01x"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %u
\n
"
,
r
);
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /t REG_BINARY /v bin4 /f /d DeAdBeEf0DD"
,
&
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %u
\n
"
,
r
);
/* Remaining nibble prefixed */
buffer
[
0
]
=
0x0d
;
buffer
[
1
]
=
0xea
;
buffer
[
2
]
=
0xdb
;
buffer
[
3
]
=
0xee
;
buffer
[
4
]
=
0xf0
;
buffer
[
5
]
=
0xdd
;
/* Remaining nibble suffixed on winXP */
buffer
[
6
]
=
0xde
;
buffer
[
7
]
=
0xad
;
buffer
[
8
]
=
0xbe
;
buffer
[
9
]
=
0xef
;
buffer
[
10
]
=
0x0d
;
buffer
[
11
]
=
0xd0
;
size
=
6
;
err
=
RegQueryValueExA
(
hkey
,
"bin4"
,
NULL
,
&
type
,
(
void
*
)
(
buffer
+
12
),
&
size
);
ok
(
err
==
ERROR_SUCCESS
,
"RegQueryValueEx failed: got %d
\n
"
,
err
);
ok
(
type
==
REG_BINARY
,
"got wrong type %u
\n
"
,
type
);
todo_wine
ok
(
size
==
6
,
"got wrong size %u
\n
"
,
size
);
todo_wine
ok
(
memcmp
(
buffer
,
buffer
+
12
,
6
)
==
0
||
broken
(
memcmp
(
buffer
+
6
,
buffer
+
12
,
6
)
==
0
/* WinXP */
),
"got wrong data
\n
"
);
/* REG_DWORD */
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /t REG_DWORD /f /d 12345678"
,
&
r
);
ok
(
r
==
REG_EXIT_SUCCESS
||
broken
(
r
==
REG_EXIT_FAILURE
/* WinXP */
),
...
...
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