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
3c2db20f
Commit
3c2db20f
authored
Mar 01, 2021
by
Hugh McMaster
Committed by
Alexandre Julliard
Mar 01, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg/tests: Rename reg.c to add.c.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cc4cc708
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
4 deletions
+16
-4
Makefile.in
programs/reg/tests/Makefile.in
+2
-2
add.c
programs/reg/tests/add.c
+13
-1
reg_test.h
programs/reg/tests/reg_test.h
+1
-1
No files found.
programs/reg/tests/Makefile.in
View file @
3c2db20f
...
...
@@ -2,9 +2,9 @@ TESTDLL = reg.exe
IMPORTS
=
advapi32
C_SRCS
=
\
add.c
\
copy.c
\
delete.c
\
export.c
\
import.c
\
query.c
\
reg.c
query.c
programs/reg/tests/
reg
.c
→
programs/reg/tests/
add
.c
View file @
3c2db20f
...
...
@@ -353,8 +353,10 @@ static void test_add(void)
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /t REG_BINARY /v bin1 /f /d 0xDeAdBeEf"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %u
\n
"
,
r
);
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /t REG_BINARY /v bin2 /f /d x01"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %u
\n
"
,
r
);
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /t REG_BINARY /v bin3 /f /d 01x"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %u
\n
"
,
r
);
...
...
@@ -397,13 +399,17 @@ static void test_add(void)
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /v dword0 /t REG_DWORD /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 dword1 /t REG_DWORD /f"
,
&
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 dword2 /t REG_DWORD /d zzz /f"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %d, expected 1
\n
"
,
r
);
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /v dword3 /t REG_DWORD /d deadbeef /f"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %d, expected 1
\n
"
,
r
);
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /v dword4 /t REG_DWORD /d 123xyz /f"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %d, expected 1
\n
"
,
r
);
...
...
@@ -431,6 +437,7 @@ static void test_add(void)
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /t REG_DWORD /v dword9 /f /d -1"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
||
broken
(
r
==
REG_EXIT_SUCCESS
/* WinXP */
),
"got exit code %u
\n
"
,
r
);
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /t REG_DWORD /v dword10 /f /d -0x1"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
||
broken
(
r
==
REG_EXIT_SUCCESS
/* WinXP */
),
"got exit code %u
\n
"
,
r
);
...
...
@@ -503,14 +510,19 @@ static void test_add(void)
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /t REG_MULTI_SZ /v multi5 /s
\"
#randomgibberish
\"
/d
\"
three#little#strings
\"
/f"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %u
\n
"
,
r
);
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /t REG_MULTI_SZ /v multi6 /s
\"\\
0
\"
/d
\"
three
\\
0little
\\
0strings
\"
/f"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %u
\n
"
,
r
);
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /t REG_MULTI_SZ /v multi7 /s
\"\"
/d
\"
three#little#strings
\"
/f"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %u
\n
"
,
r
);
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /t REG_MULTI_SZ /v multi8 /s
\"
#
\"
/d
\"
##
\"
/f"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %u
\n
"
,
r
);
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /t REG_MULTI_SZ /v multi9 /s
\"
#
\"
/d
\"
two##strings
\"
/f"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %u
\n
"
,
r
);
run_reg_exe
(
"reg add HKCU
\\
"
KEY_BASE
" /t REG_MULTI_SZ /v multi10 /s
\"
#
\"
/d
\"
#a
\"
/f"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
,
"got exit code %u
\n
"
,
r
);
...
...
@@ -613,7 +625,7 @@ static void test_add(void)
delete_tree
(
HKEY_CURRENT_USER
,
KEY_BASE
);
}
START_TEST
(
reg
)
START_TEST
(
add
)
{
DWORD
r
;
...
...
programs/reg/tests/reg_test.h
View file @
3c2db20f
...
...
@@ -30,7 +30,7 @@
#define REG_EXIT_SUCCESS 0
#define REG_EXIT_FAILURE 1
/*
Helper functions
*/
/*
add.c
*/
#define run_reg_exe(c,r) run_reg_exe_(__LINE__,c,r)
BOOL
run_reg_exe_
(
unsigned
line
,
const
char
*
cmd
,
DWORD
*
rc
);
...
...
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