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
cbc8d290
Commit
cbc8d290
authored
Oct 24, 2014
by
Bruno Jesus
Committed by
Alexandre Julliard
Oct 27, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Add a test for enumerating a registry key without setting it.
parent
3beee00a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
registry.c
dlls/advapi32/tests/registry.c
+27
-0
No files found.
dlls/advapi32/tests/registry.c
View file @
cbc8d290
...
...
@@ -517,6 +517,33 @@ static void test_enum_value(void)
res
=
RegSetValueExA
(
test_key
,
"Test"
,
0
,
REG_BINARY
,
NULL
,
0
);
ok
(
ERROR_SUCCESS
==
res
||
ERROR_INVALID_PARAMETER
==
res
,
"RegSetValueExA returned %d
\n
"
,
res
);
/* test reading the value and data without setting them */
val_count
=
20
;
data_count
=
20
;
type
=
1234
;
strcpy
(
value
,
"xxxxxxxxxx"
);
strcpy
(
data
,
"xxxxxxxxxx"
);
res
=
RegEnumValueA
(
test_key
,
0
,
value
,
&
val_count
,
NULL
,
&
type
,
(
LPBYTE
)
data
,
&
data_count
);
ok
(
res
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %d
\n
"
,
res
);
ok
(
val_count
==
4
,
"val_count set to %d instead of 4
\n
"
,
val_count
);
ok
(
data_count
==
0
,
"data_count set to %d instead of 0
\n
"
,
data_count
);
ok
(
type
==
REG_BINARY
,
"type %d is not REG_BINARY
\n
"
,
type
);
ok
(
!
strcmp
(
value
,
"Test"
),
"value is '%s' instead of Test
\n
"
,
value
);
ok
(
!
strcmp
(
data
,
"xxxxxxxxxx"
),
"data is '%s' instead of xxxxxxxxxx
\n
"
,
data
);
val_count
=
20
;
data_count
=
20
;
type
=
1234
;
memcpy
(
valueW
,
xxxW
,
sizeof
(
xxxW
)
);
memcpy
(
dataW
,
xxxW
,
sizeof
(
xxxW
)
);
res
=
RegEnumValueW
(
test_key
,
0
,
valueW
,
&
val_count
,
NULL
,
&
type
,
(
BYTE
*
)
dataW
,
&
data_count
);
ok
(
res
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %d
\n
"
,
res
);
ok
(
val_count
==
4
,
"val_count set to %d instead of 4
\n
"
,
val_count
);
ok
(
data_count
==
0
,
"data_count set to %d instead of 0
\n
"
,
data_count
);
ok
(
type
==
REG_BINARY
,
"type %d is not REG_BINARY
\n
"
,
type
);
ok
(
!
memcmp
(
valueW
,
testW
,
sizeof
(
testW
)
),
"value is not 'Test'
\n
"
);
ok
(
!
memcmp
(
dataW
,
xxxW
,
sizeof
(
xxxW
)
),
"data is not 'xxxxxxxxxx'
\n
"
);
res
=
RegSetValueExA
(
test_key
,
"Test"
,
0
,
REG_SZ
,
(
const
BYTE
*
)
"foobar"
,
7
);
ok
(
res
==
0
,
"RegSetValueExA failed error %d
\n
"
,
res
);
...
...
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