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
94b582b1
Commit
94b582b1
authored
Apr 30, 2021
by
Hugh McMaster
Committed by
Alexandre Julliard
Apr 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg/tests: Split the REG_DWORD_BIG_ENDIAN tests from the REG_DWORD tests.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1110421d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
13 deletions
+30
-13
add.c
programs/reg/tests/add.c
+30
-13
No files found.
programs/reg/tests/add.c
View file @
94b582b1
...
...
@@ -698,22 +698,38 @@ static void test_reg_dword(void)
dword
=
456
;
verify_reg
(
hkey
,
"DWORD_LE"
,
REG_DWORD_LITTLE_ENDIAN
,
&
dword
,
sizeof
(
dword
),
0
);
/* REG_DWORD_BIG_ENDIAN */
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /v DWORD_BE /t REG_DWORD_BIG_ENDIAN /d 456 /f"
,
&
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %u, expected 0
\n
"
,
r
);
dword
=
456
;
verify_reg
(
hkey
,
"DWORD_BE"
,
REG_DWORD_BIG_ENDIAN
,
&
dword
,
sizeof
(
dword
),
0
);
/* REG_DWORD_BIG_ENDIAN is broken in every version of windows. It behaves like
* an ordinary REG_DWORD - that is little endian. GG */
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /v DWORD_BE2 /t REG_DWORD_BIG_ENDIAN /f /d"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %u, expected 1
\n
"
,
r
);
close_key
(
hkey
);
delete_key
(
HKEY_CURRENT_USER
,
KEY_BASE
);
}
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /v DWORD_BE3 /t REG_DWORD_BIG_ENDIAN /f"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
||
broken
(
r
==
REG_EXIT_SUCCESS
/* WinXP */
),
"got exit code %u, expected 1
\n
"
,
r
);
/* REG_DWORD_BIG_ENDIAN is broken in every version of Windows. It behaves
* like an ordinary REG_DWORD, which is little endian.
*/
static
void
test_reg_dword_big_endian
(
void
)
{
HKEY
hkey
;
DWORD
r
,
dword
;
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /ve /t REG_DWORD_BIG_ENDIAN /f"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
||
broken
(
r
==
REG_EXIT_SUCCESS
/* WinXP */
),
"got exit code %u, expected 1
\n
"
,
r
);
ok
(
r
==
REG_EXIT_FAILURE
||
broken
(
r
==
REG_EXIT_SUCCESS
/* WinXP */
),
"got exit code %d, expected 1
\n
"
,
r
);
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /v Test1 /t REG_DWORD_BIG_ENDIAN /f /d"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %d, expected 1
\n
"
,
r
);
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /v Test2 /t REG_DWORD_BIG_ENDIAN /f"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
||
broken
(
r
==
REG_EXIT_SUCCESS
/* WinXP */
),
"got exit code %d, expected 1
\n
"
,
r
);
add_key
(
HKEY_CURRENT_USER
,
KEY_BASE
,
&
hkey
);
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /v Test3 /t REG_DWORD_BIG_ENDIAN /d 456 /f"
,
&
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
dword
=
456
;
verify_reg
(
hkey
,
"Test3"
,
REG_DWORD_BIG_ENDIAN
,
&
dword
,
sizeof
(
dword
),
0
);
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /v Test4 /t REG_DWORD_BIG_ENDIAN /d 0x456 /f"
,
&
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
dword
=
0x456
;
verify_reg
(
hkey
,
"Test4"
,
REG_DWORD_BIG_ENDIAN
,
&
dword
,
sizeof
(
dword
),
0
);
close_key
(
hkey
);
delete_key
(
HKEY_CURRENT_USER
,
KEY_BASE
);
...
...
@@ -835,5 +851,6 @@ START_TEST(add)
test_reg_expand_sz
();
test_reg_binary
();
test_reg_dword
();
test_reg_dword_big_endian
();
test_reg_multi_sz
();
}
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