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
1a38b7bf
Commit
1a38b7bf
authored
Jan 15, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jan 15, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Test for enumeration order preservation of reg keys.
parent
15847196
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
0 deletions
+47
-0
registry.c
dlls/advapi32/tests/registry.c
+47
-0
No files found.
dlls/advapi32/tests/registry.c
View file @
1a38b7bf
...
...
@@ -1475,6 +1475,52 @@ static void test_reg_delete_tree(void)
"Expected ERROR_FILE_NOT_FOUND, got %d
\n
"
,
ret
);
}
static
void
test_rw_order
(
void
)
{
HKEY
hKey
;
DWORD
dw
=
0
;
static
char
keyname
[]
=
"test_rw_order"
;
char
value_buf
[
2
];
DWORD
values
,
value_len
,
value_name_max_len
;
LSTATUS
ret
;
RegDeleteKeyA
(
HKEY_CURRENT_USER
,
keyname
);
ret
=
RegCreateKeyA
(
HKEY_CURRENT_USER
,
keyname
,
&
hKey
);
if
(
ret
!=
ERROR_SUCCESS
)
{
skip
(
"Couldn't create key. Skipping.
\n
"
);
return
;
}
ok
(
!
RegSetValueExA
(
hKey
,
"A"
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
dw
,
sizeof
(
dw
)),
"RegSetValueExA for value
\"
A
\"
failed
\n
"
);
ok
(
!
RegSetValueExA
(
hKey
,
"C"
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
dw
,
sizeof
(
dw
)),
"RegSetValueExA for value
\"
C
\"
failed
\n
"
);
ok
(
!
RegSetValueExA
(
hKey
,
"D"
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
dw
,
sizeof
(
dw
)),
"RegSetValueExA for value
\"
D
\"
failed
\n
"
);
ok
(
!
RegSetValueExA
(
hKey
,
"B"
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
dw
,
sizeof
(
dw
)),
"RegSetValueExA for value
\"
B
\"
failed
\n
"
);
ok
(
!
RegQueryInfoKeyA
(
hKey
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
&
values
,
&
value_name_max_len
,
NULL
,
NULL
,
NULL
),
"RegQueryInfoKeyA failed
\n
"
);
ok
(
values
==
4
,
"Expected 4 values, got %u
\n
"
,
values
);
/* Value enumeration preserves RegSetValueEx call order */
value_len
=
2
;
ok
(
!
RegEnumValueA
(
hKey
,
0
,
value_buf
,
&
value_len
,
NULL
,
NULL
,
NULL
,
NULL
),
"RegEnumValueA failed
\n
"
);
ok
(
strcmp
(
value_buf
,
"A"
)
==
0
,
"Expected name
\"
A
\"
, got %s
\n
"
,
value_buf
);
value_len
=
2
;
ok
(
!
RegEnumValueA
(
hKey
,
1
,
value_buf
,
&
value_len
,
NULL
,
NULL
,
NULL
,
NULL
),
"RegEnumValueA failed
\n
"
);
todo_wine
ok
(
strcmp
(
value_buf
,
"C"
)
==
0
,
"Expected name
\"
C
\"
, got %s
\n
"
,
value_buf
);
value_len
=
2
;
ok
(
!
RegEnumValueA
(
hKey
,
2
,
value_buf
,
&
value_len
,
NULL
,
NULL
,
NULL
,
NULL
),
"RegEnumValueA failed
\n
"
);
todo_wine
ok
(
strcmp
(
value_buf
,
"D"
)
==
0
,
"Expected name
\"
D
\"
, got %s
\n
"
,
value_buf
);
value_len
=
2
;
ok
(
!
RegEnumValueA
(
hKey
,
3
,
value_buf
,
&
value_len
,
NULL
,
NULL
,
NULL
,
NULL
),
"RegEnumValueA failed
\n
"
);
todo_wine
ok
(
strcmp
(
value_buf
,
"B"
)
==
0
,
"Expected name
\"
B
\"
, got %s
\n
"
,
value_buf
);
ok
(
!
RegDeleteKey
(
HKEY_CURRENT_USER
,
keyname
),
"Failed to delete key
\n
"
);
}
START_TEST
(
registry
)
{
/* Load pointers for functions that are not available in all Windows versions */
...
...
@@ -1506,6 +1552,7 @@ START_TEST(registry)
}
test_reg_delete_tree
();
test_rw_order
();
/* cleanup */
delete_key
(
hkey_main
);
...
...
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