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
e3395d50
Commit
e3395d50
authored
Sep 05, 2017
by
Hugh McMaster
Committed by
Alexandre Julliard
Sep 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg/tests: Delete the test registry key before starting each test.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
38d314ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
reg.c
programs/reg/tests/reg.c
+18
-0
No files found.
programs/reg/tests/reg.c
View file @
e3395d50
...
@@ -507,6 +507,9 @@ static void test_delete(void)
...
@@ -507,6 +507,9 @@ static void test_delete(void)
DWORD
r
;
DWORD
r
;
const
DWORD
deadbeef
=
0xdeadbeef
;
const
DWORD
deadbeef
=
0xdeadbeef
;
err
=
RegDeleteKeyA
(
HKEY_CURRENT_USER
,
KEY_BASE
);
ok
(
err
==
ERROR_SUCCESS
||
err
==
ERROR_FILE_NOT_FOUND
,
"got %d
\n
"
,
err
);
run_reg_exe
(
"reg delete"
,
&
r
);
run_reg_exe
(
"reg delete"
,
&
r
);
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
);
...
@@ -564,6 +567,9 @@ static void test_query(void)
...
@@ -564,6 +567,9 @@ static void test_query(void)
const
DWORD
dword1
=
0x123
;
const
DWORD
dword1
=
0x123
;
const
DWORD
dword2
=
0xabc
;
const
DWORD
dword2
=
0xabc
;
err
=
RegDeleteKeyA
(
HKEY_CURRENT_USER
,
KEY_BASE
);
ok
(
err
==
ERROR_SUCCESS
||
err
==
ERROR_FILE_NOT_FOUND
,
"got %d
\n
"
,
err
);
run_reg_exe
(
"reg query"
,
&
r
);
run_reg_exe
(
"reg query"
,
&
r
);
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
);
...
@@ -800,6 +806,9 @@ static void test_import(void)
...
@@ -800,6 +806,9 @@ static void test_import(void)
LONG
err
;
LONG
err
;
BYTE
hex
[
8
];
BYTE
hex
[
8
];
err
=
RegDeleteKeyA
(
HKEY_CURRENT_USER
,
KEY_BASE
);
ok
(
err
==
ERROR_SUCCESS
||
err
==
ERROR_FILE_NOT_FOUND
,
"got %d
\n
"
,
err
);
run_reg_exe
(
"reg import"
,
&
r
);
run_reg_exe
(
"reg import"
,
&
r
);
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
);
...
@@ -2314,6 +2323,9 @@ static void test_unicode_import(void)
...
@@ -2314,6 +2323,9 @@ static void test_unicode_import(void)
char
buffer
[
24
];
char
buffer
[
24
];
BYTE
hex
[
8
];
BYTE
hex
[
8
];
err
=
RegDeleteKeyA
(
HKEY_CURRENT_USER
,
KEY_BASE
);
ok
(
err
==
ERROR_SUCCESS
||
err
==
ERROR_FILE_NOT_FOUND
,
"got %d
\n
"
,
err
);
test_import_wstr
(
"REGEDIT
\n
"
,
&
r
);
test_import_wstr
(
"REGEDIT
\n
"
,
&
r
);
ok
(
r
==
REG_EXIT_FAILURE
||
broken
(
r
==
REG_EXIT_SUCCESS
)
/* WinXP */
,
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
);
...
@@ -3800,6 +3812,9 @@ static void test_import_with_whitespace(void)
...
@@ -3800,6 +3812,9 @@ static void test_import_with_whitespace(void)
DWORD
r
,
dword
;
DWORD
r
,
dword
;
LONG
err
;
LONG
err
;
err
=
RegDeleteKeyA
(
HKEY_CURRENT_USER
,
KEY_BASE
);
ok
(
err
==
ERROR_SUCCESS
||
err
==
ERROR_FILE_NOT_FOUND
,
"got %d
\n
"
,
err
);
test_import_str
(
" REGEDIT4
\n\n
"
test_import_str
(
" REGEDIT4
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\n\n
"
,
&
r
);
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\n\n
"
,
&
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %u, expected 0
\n
"
,
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %u, expected 0
\n
"
,
r
);
...
@@ -3947,6 +3962,9 @@ static void test_unicode_import_with_whitespace(void)
...
@@ -3947,6 +3962,9 @@ static void test_unicode_import_with_whitespace(void)
DWORD
r
,
dword
;
DWORD
r
,
dword
;
LONG
err
;
LONG
err
;
err
=
RegDeleteKeyA
(
HKEY_CURRENT_USER
,
KEY_BASE
);
ok
(
err
==
ERROR_SUCCESS
||
err
==
ERROR_FILE_NOT_FOUND
,
"got %d
\n
"
,
err
);
test_import_wstr
(
"
\xef\xbb\xbf
Windows Registry Editor Version 5.00
\n\n
"
test_import_wstr
(
"
\xef\xbb\xbf
Windows Registry Editor Version 5.00
\n\n
"
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\n\n
"
,
&
r
);
"[HKEY_CURRENT_USER
\\
"
KEY_BASE
"]
\n\n
"
,
&
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %u, expected 0
\n
"
,
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %u, expected 0
\n
"
,
r
);
...
...
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