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
44246e47
Commit
44246e47
authored
Jun 12, 2005
by
Robert Shearman
Committed by
Alexandre Julliard
Jun 12, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix registry test for Win9x by skipping a section that fails, but
succeeds on NT.
parent
22be9fbc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
42 deletions
+47
-42
registry.c
dlls/advapi32/tests/registry.c
+47
-42
No files found.
dlls/advapi32/tests/registry.c
View file @
44246e47
...
@@ -267,48 +267,53 @@ static void test_reg_open_key()
...
@@ -267,48 +267,53 @@ static void test_reg_open_key()
ok
(
hkResult
!=
NULL
,
"expected hkResult != NULL
\n
"
);
ok
(
hkResult
!=
NULL
,
"expected hkResult != NULL
\n
"
);
hkPreserve
=
hkResult
;
hkPreserve
=
hkResult
;
/* open same key twice */
/* these tests fail on Win9x, but we want to be compatible with NT, so
ret
=
RegOpenKeyA
(
HKEY_CURRENT_USER
,
"Software
\\
Wine
\\
Test"
,
&
hkResult
);
* run them if we can */
ok
(
ret
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %ld
\n
"
,
ret
);
if
(
!
(
GetVersion
()
&
0x80000000
))
ok
(
hkResult
!=
hkPreserve
,
"epxected hkResult != hkPreserve
\n
"
);
{
ok
(
hkResult
!=
NULL
,
"hkResult != NULL
\n
"
);
/* open same key twice */
RegCloseKey
(
hkResult
);
ret
=
RegOpenKeyA
(
HKEY_CURRENT_USER
,
"Software
\\
Wine
\\
Test"
,
&
hkResult
);
ok
(
ret
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %ld
\n
"
,
ret
);
/* open nonexistent key
ok
(
hkResult
!=
hkPreserve
,
"epxected hkResult != hkPreserve
\n
"
);
* check that hkResult is set to NULL
ok
(
hkResult
!=
NULL
,
"hkResult != NULL
\n
"
);
*/
RegCloseKey
(
hkResult
);
hkResult
=
hkPreserve
;
ret
=
RegOpenKeyA
(
HKEY_CURRENT_USER
,
"Software
\\
Wine
\\
Nonexistent"
,
&
hkResult
);
/* open nonexistent key
ok
(
ret
==
ERROR_FILE_NOT_FOUND
,
"expected ERROR_FILE_NOT_FOUND, got %ld
\n
"
,
ret
);
* check that hkResult is set to NULL
ok
(
hkResult
==
NULL
,
"expected hkResult == NULL
\n
"
);
*/
hkResult
=
hkPreserve
;
/* open the same nonexistent key again to make sure the key wasn't created */
ret
=
RegOpenKeyA
(
HKEY_CURRENT_USER
,
"Software
\\
Wine
\\
Nonexistent"
,
&
hkResult
);
hkResult
=
hkPreserve
;
ok
(
ret
==
ERROR_FILE_NOT_FOUND
,
"expected ERROR_FILE_NOT_FOUND, got %ld
\n
"
,
ret
);
ret
=
RegOpenKeyA
(
HKEY_CURRENT_USER
,
"Software
\\
Wine
\\
Nonexistent"
,
&
hkResult
);
ok
(
hkResult
==
NULL
,
"expected hkResult == NULL
\n
"
);
ok
(
ret
==
ERROR_FILE_NOT_FOUND
,
"expected ERROR_FILE_NOT_FOUND, got %ld
\n
"
,
ret
);
ok
(
hkResult
==
NULL
,
"expected hkResult == NULL
\n
"
);
/* open the same nonexistent key again to make sure the key wasn't created */
hkResult
=
hkPreserve
;
/* send in NULL lpSubKey
ret
=
RegOpenKeyA
(
HKEY_CURRENT_USER
,
"Software
\\
Wine
\\
Nonexistent"
,
&
hkResult
);
* check that hkResult receives the value of hKey
ok
(
ret
==
ERROR_FILE_NOT_FOUND
,
"expected ERROR_FILE_NOT_FOUND, got %ld
\n
"
,
ret
);
*/
ok
(
hkResult
==
NULL
,
"expected hkResult == NULL
\n
"
);
hkResult
=
hkPreserve
;
ret
=
RegOpenKeyA
(
HKEY_CURRENT_USER
,
NULL
,
&
hkResult
);
/* send in NULL lpSubKey
ok
(
ret
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %ld
\n
"
,
ret
);
* check that hkResult receives the value of hKey
ok
(
hkResult
==
HKEY_CURRENT_USER
,
"expected hkResult == HKEY_CURRENT_USER
\n
"
);
*/
hkResult
=
hkPreserve
;
/* send empty-string in lpSubKey */
ret
=
RegOpenKeyA
(
HKEY_CURRENT_USER
,
NULL
,
&
hkResult
);
hkResult
=
hkPreserve
;
ok
(
ret
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %ld
\n
"
,
ret
);
ret
=
RegOpenKeyA
(
HKEY_CURRENT_USER
,
""
,
&
hkResult
);
ok
(
hkResult
==
HKEY_CURRENT_USER
,
"expected hkResult == HKEY_CURRENT_USER
\n
"
);
ok
(
ret
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %ld
\n
"
,
ret
);
ok
(
hkResult
==
HKEY_CURRENT_USER
,
"expected hkResult == HKEY_CURRENT_USER
\n
"
);
/* send empty-string in lpSubKey */
hkResult
=
hkPreserve
;
/* send in NULL lpSubKey and NULL hKey
ret
=
RegOpenKeyA
(
HKEY_CURRENT_USER
,
""
,
&
hkResult
);
* hkResult is set to NULL
ok
(
ret
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %ld
\n
"
,
ret
);
*/
ok
(
hkResult
==
HKEY_CURRENT_USER
,
"expected hkResult == HKEY_CURRENT_USER
\n
"
);
hkResult
=
hkPreserve
;
ret
=
RegOpenKeyA
(
NULL
,
NULL
,
&
hkResult
);
/* send in NULL lpSubKey and NULL hKey
ok
(
ret
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %ld
\n
"
,
ret
);
* hkResult is set to NULL
ok
(
hkResult
==
NULL
,
"expected hkResult == NULL
\n
"
);
*/
hkResult
=
hkPreserve
;
ret
=
RegOpenKeyA
(
NULL
,
NULL
,
&
hkResult
);
ok
(
ret
==
ERROR_SUCCESS
,
"expected ERROR_SUCCESS, got %ld
\n
"
,
ret
);
ok
(
hkResult
==
NULL
,
"expected hkResult == NULL
\n
"
);
}
/* only send NULL hKey
/* only send NULL hKey
* the value of hkResult remains unchanged
* the value of hkResult remains unchanged
...
...
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