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
45955658
Commit
45955658
authored
Jul 01, 2021
by
Hugh McMaster
Committed by
Alexandre Julliard
Jul 01, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg/tests: Test use of registry views when querying registry values.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3186a004
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
query.c
programs/reg/tests/query.c
+30
-0
No files found.
programs/reg/tests/query.c
View file @
45955658
...
...
@@ -322,6 +322,12 @@ static const char *test9b = "\r\n"
" Test4 REG_DWORD 0xabc
\r\n
"
" Wine REG_SZ Second instance
\r\n\r\n
"
;
static
const
char
*
test9c
=
"
\r\n
"
"HKEY_LOCAL_MACHINE
\\
"
KEY_BASE
"
\r\n
"
" Wine REG_SZ First instance
\r\n\r\n
"
"HKEY_LOCAL_MACHINE
\\
"
KEY_BASE
"
\\
subkey
\r\n
"
" Wine REG_SZ Second instance
\r\n\r\n
"
;
static
void
create_test_key
(
REGSAM
sam
)
{
HKEY
hkey
,
subkey
;
...
...
@@ -367,6 +373,10 @@ static void test_registry_view_win32(void)
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
compare_query
(
buf
,
test9b
,
FALSE
,
0
);
read_reg_output
(
"reg query HKLM
\\
"
KEY_BASE
" /v Wine /s /reg:32"
,
buf
,
sizeof
(
buf
),
&
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
compare_query
(
buf
,
test9c
,
TRUE
,
0
);
delete_tree
(
HKEY_LOCAL_MACHINE
,
KEY_BASE
,
KEY_WOW64_32KEY
);
/* Try querying the 64-bit registry view, which doesn't exist on 32-bit Windows */
...
...
@@ -380,6 +390,10 @@ static void test_registry_view_win32(void)
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
compare_query
(
buf
,
test9b
,
FALSE
,
0
);
read_reg_output
(
"reg query HKLM
\\
"
KEY_BASE
" /v Wine /s /reg:64"
,
buf
,
sizeof
(
buf
),
&
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
compare_query
(
buf
,
test9c
,
TRUE
,
0
);
delete_tree
(
HKEY_LOCAL_MACHINE
,
KEY_BASE
,
KEY_WOW64_64KEY
);
}
...
...
@@ -407,6 +421,10 @@ static void test_registry_view_win64(void)
todo_wine
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
compare_query
(
buf
,
test9b
,
FALSE
,
TODO_REG_COMPARE
);
read_reg_output
(
"reg query HKLM
\\
"
KEY_BASE
" /v Wine /s /reg:32"
,
buf
,
sizeof
(
buf
),
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
compare_query
(
buf
,
test9c
,
TRUE
,
TODO_REG_COMPARE
);
delete_tree
(
HKEY_LOCAL_MACHINE
,
KEY_BASE
,
KEY_WOW64_32KEY
);
delete_tree
(
HKEY_LOCAL_MACHINE
,
KEY_BASE
,
KEY_WOW64_64KEY
);
...
...
@@ -421,6 +439,10 @@ static void test_registry_view_win64(void)
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
compare_query
(
buf
,
test9b
,
FALSE
,
0
);
read_reg_output
(
"reg query HKLM
\\
"
KEY_BASE
" /v Wine /s /reg:64"
,
buf
,
sizeof
(
buf
),
&
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
compare_query
(
buf
,
test9c
,
TRUE
,
0
);
delete_tree
(
HKEY_LOCAL_MACHINE
,
KEY_BASE
,
KEY_WOW64_64KEY
);
}
...
...
@@ -447,6 +469,10 @@ static void test_registry_view_wow64(void)
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
compare_query
(
buf
,
test9b
,
FALSE
,
0
);
read_reg_output
(
"reg query HKLM
\\
"
KEY_BASE
" /v Wine /s /reg:32"
,
buf
,
sizeof
(
buf
),
&
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
compare_query
(
buf
,
test9c
,
TRUE
,
0
);
delete_tree
(
HKEY_LOCAL_MACHINE
,
KEY_BASE
,
KEY_WOW64_32KEY
);
delete_tree
(
HKEY_LOCAL_MACHINE
,
KEY_BASE
,
KEY_WOW64_64KEY
);
...
...
@@ -461,6 +487,10 @@ static void test_registry_view_wow64(void)
todo_wine
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
compare_query
(
buf
,
test9b
,
FALSE
,
TODO_REG_COMPARE
);
read_reg_output
(
"reg query HKLM
\\
"
KEY_BASE
" /v Wine /s /reg:64"
,
buf
,
sizeof
(
buf
),
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
compare_query
(
buf
,
test9c
,
TRUE
,
TODO_REG_COMPARE
);
delete_tree
(
HKEY_LOCAL_MACHINE
,
KEY_BASE
,
KEY_WOW64_64KEY
);
}
...
...
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