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
82c6c104
Commit
82c6c104
authored
Nov 06, 2014
by
Jonathan Vollebregt
Committed by
Alexandre Julliard
Nov 06, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg/tests: Test for empty type and empty binary input.
parent
3326cad0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
reg.c
programs/reg/tests/reg.c
+13
-0
No files found.
programs/reg/tests/reg.c
View file @
82c6c104
...
...
@@ -108,6 +108,15 @@ static void test_add(void)
err
=
RegOpenKeyExA
(
HKEY_CURRENT_USER
,
KEY_BASE
,
0
,
KEY_READ
,
&
hkey
);
ok
(
err
==
ERROR_SUCCESS
,
"key creation failed, got %d
\n
"
,
err
);
/* Test empty type */
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /v emptyType /t
\"\"
/d WineTest /f"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_SUCCESS
||
broken
(
r
==
REG_EXIT_FAILURE
/* WinXP */
),
"got exit code %u
\n
"
,
r
);
if
(
r
==
REG_EXIT_SUCCESS
)
todo_wine
verify_reg
(
hkey
,
"emptyType"
,
REG_SZ
,
""
,
1
,
0
);
else
todo_wine
win_skip
(
"broken reg.exe detected
\n
"
);
/* Test input key formats */
run_reg_exe
(
"reg add
\\
HKCU
\\
"
KEY_BASE
"
\\
keytest0 /f"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %u
\n
"
,
r
);
...
...
@@ -225,6 +234,10 @@ static void test_add(void)
todo_wine
ok
(
memcmp
(
buffer
,
buffer
+
12
,
6
)
==
0
||
broken
(
memcmp
(
buffer
+
6
,
buffer
+
12
,
6
)
==
0
/* WinXP */
),
"got wrong data
\n
"
);
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /t REG_BINARY /v bin5 /d
\"\"
/f"
,
&
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %u
\n
"
,
r
);
verify_reg
(
hkey
,
"bin5"
,
REG_BINARY
,
buffer
,
0
,
0
);
/* 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