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
acf0c929
Commit
acf0c929
authored
Feb 10, 2016
by
Hugh McMaster
Committed by
Alexandre Julliard
Feb 11, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg/tests: Add tests for /d with no data argument.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
20a41d03
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
reg.c
programs/reg/tests/reg.c
+11
-0
No files found.
programs/reg/tests/reg.c
View file @
acf0c929
...
@@ -168,6 +168,9 @@ static void test_add(void)
...
@@ -168,6 +168,9 @@ static void test_add(void)
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
verify_reg
(
hkey
,
"test"
,
REG_SZ
,
""
,
1
,
TODO_REG_SIZE
);
verify_reg
(
hkey
,
"test"
,
REG_SZ
,
""
,
1
,
TODO_REG_SIZE
);
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /v test1 /t REG_SZ /f /d"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %d, expected 1
\n
"
,
r
);
run_reg_exe
(
"reg add HKEY_CURRENT_USER
\\
"
KEY_BASE
" /ve /d WineTEST /f"
,
&
r
);
run_reg_exe
(
"reg add HKEY_CURRENT_USER
\\
"
KEY_BASE
" /ve /d WineTEST /f"
,
&
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
verify_reg
(
hkey
,
""
,
REG_SZ
,
"WineTEST"
,
9
,
0
);
verify_reg
(
hkey
,
""
,
REG_SZ
,
"WineTEST"
,
9
,
0
);
...
@@ -238,6 +241,9 @@ static void test_add(void)
...
@@ -238,6 +241,9 @@ static void test_add(void)
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %u
\n
"
,
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %u
\n
"
,
r
);
verify_reg
(
hkey
,
"bin5"
,
REG_BINARY
,
buffer
,
0
,
0
);
verify_reg
(
hkey
,
"bin5"
,
REG_BINARY
,
buffer
,
0
,
0
);
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /v bin6 /t REG_BINARY /f /d"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %d, expected 1
\n
"
,
r
);
/* REG_DWORD */
/* REG_DWORD */
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /t REG_DWORD /f /d 12345678"
,
&
r
);
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 */
),
ok
(
r
==
REG_EXIT_SUCCESS
||
broken
(
r
==
REG_EXIT_FAILURE
/* WinXP */
),
...
@@ -248,6 +254,8 @@ static void test_add(void)
...
@@ -248,6 +254,8 @@ static void test_add(void)
else
else
win_skip
(
"broken reg.exe detected
\n
"
);
win_skip
(
"broken reg.exe detected
\n
"
);
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /v dword0 /t REG_DWORD /f /d"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %d, expected 1
\n
"
,
r
);
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /v dword1 /t REG_DWORD /f"
,
&
r
);
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /v dword1 /t REG_DWORD /f"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_FAILURE
||
broken
(
r
==
REG_EXIT_SUCCESS
/* WinXP */
),
todo_wine
ok
(
r
==
REG_EXIT_FAILURE
||
broken
(
r
==
REG_EXIT_SUCCESS
/* WinXP */
),
"got exit code %d, expected 0
\n
"
,
r
);
"got exit code %d, expected 0
\n
"
,
r
);
...
@@ -344,6 +352,9 @@ static void test_add(void)
...
@@ -344,6 +352,9 @@ static void test_add(void)
buffer
[
0
]
=
'a'
;
buffer
[
1
]
=
0
;
buffer
[
2
]
=
0
;
buffer
[
0
]
=
'a'
;
buffer
[
1
]
=
0
;
buffer
[
2
]
=
0
;
verify_reg
(
hkey
,
"multi11"
,
REG_MULTI_SZ
,
buffer
,
3
,
TODO_REG_SIZE
);
verify_reg
(
hkey
,
"multi11"
,
REG_MULTI_SZ
,
buffer
,
3
,
TODO_REG_SIZE
);
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /v multi12 /t REG_MULTI_SZ /f /d"
,
&
r
);
todo_wine
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %d, expected 1
\n
"
,
r
);
RegCloseKey
(
hkey
);
RegCloseKey
(
hkey
);
err
=
RegDeleteKeyA
(
HKEY_CURRENT_USER
,
KEY_BASE
);
err
=
RegDeleteKeyA
(
HKEY_CURRENT_USER
,
KEY_BASE
);
...
...
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