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
3c340fda
Commit
3c340fda
authored
Feb 11, 2016
by
Hugh McMaster
Committed by
Alexandre Julliard
Feb 11, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg: Fail when /d is used without an accompanying argument.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2c0359fb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
reg.c
programs/reg/reg.c
+7
-1
reg.c
programs/reg/tests/reg.c
+4
-4
No files found.
programs/reg/reg.c
View file @
3c340fda
...
@@ -562,7 +562,13 @@ int wmain(int argc, WCHAR *argvW[])
...
@@ -562,7 +562,13 @@ int wmain(int argc, WCHAR *argvW[])
else
if
(
!
lstrcmpiW
(
argvW
[
i
],
slashSW
))
else
if
(
!
lstrcmpiW
(
argvW
[
i
],
slashSW
))
separator
=
argvW
[
++
i
][
0
];
separator
=
argvW
[
++
i
][
0
];
else
if
(
!
lstrcmpiW
(
argvW
[
i
],
slashDW
))
else
if
(
!
lstrcmpiW
(
argvW
[
i
],
slashDW
))
data
=
argvW
[
++
i
];
{
if
(
!
(
data
=
argvW
[
++
i
]))
{
output_message
(
STRING_INVALID_CMDLINE
);
return
1
;
}
}
else
if
(
!
lstrcmpiW
(
argvW
[
i
],
slashFW
))
else
if
(
!
lstrcmpiW
(
argvW
[
i
],
slashFW
))
force
=
TRUE
;
force
=
TRUE
;
}
}
...
...
programs/reg/tests/reg.c
View file @
3c340fda
...
@@ -169,7 +169,7 @@ static void test_add(void)
...
@@ -169,7 +169,7 @@ static void test_add(void)
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
);
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
);
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
);
...
@@ -242,7 +242,7 @@ static void test_add(void)
...
@@ -242,7 +242,7 @@ static void test_add(void)
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
);
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
);
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
);
...
@@ -255,7 +255,7 @@ static void test_add(void)
...
@@ -255,7 +255,7 @@ static void test_add(void)
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
);
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
);
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 1
\n
"
,
r
);
"got exit code %d, expected 1
\n
"
,
r
);
...
@@ -353,7 +353,7 @@ static void test_add(void)
...
@@ -353,7 +353,7 @@ static void test_add(void)
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
);
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
);
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %d, expected 1
\n
"
,
r
);
RegCloseKey
(
hkey
);
RegCloseKey
(
hkey
);
...
...
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