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
c3a58cc7
Commit
c3a58cc7
authored
Sep 08, 2008
by
Paul Vriens
Committed by
Alexandre Julliard
Sep 08, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Fix a few tests on win9x.
parent
a061f642
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
12 deletions
+20
-12
module.c
dlls/kernel32/tests/module.c
+20
-12
No files found.
dlls/kernel32/tests/module.c
View file @
c3a58cc7
...
@@ -223,7 +223,7 @@ static void testLoadLibraryEx(void)
...
@@ -223,7 +223,7 @@ static void testLoadLibraryEx(void)
HANDLE
hfile
;
HANDLE
hfile
;
hfile
=
CreateFileA
(
"testfile.dll"
,
GENERIC_READ
|
GENERIC_WRITE
,
hfile
=
CreateFileA
(
"testfile.dll"
,
GENERIC_READ
|
GENERIC_WRITE
,
FILE_SHARE_
DELETE
|
FILE_SHARE_
READ
|
FILE_SHARE_WRITE
,
FILE_SHARE_READ
|
FILE_SHARE_WRITE
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
0
);
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
0
);
ok
(
hfile
!=
INVALID_HANDLE_VALUE
,
"Expected a valid file handle
\n
"
);
ok
(
hfile
!=
INVALID_HANDLE_VALUE
,
"Expected a valid file handle
\n
"
);
...
@@ -231,24 +231,28 @@ static void testLoadLibraryEx(void)
...
@@ -231,24 +231,28 @@ static void testLoadLibraryEx(void)
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
hmodule
=
LoadLibraryExA
(
NULL
,
NULL
,
0
);
hmodule
=
LoadLibraryExA
(
NULL
,
NULL
,
0
);
ok
(
hmodule
==
0
,
"Expected 0, got %p
\n
"
,
hmodule
);
ok
(
hmodule
==
0
,
"Expected 0, got %p
\n
"
,
hmodule
);
ok
(
GetLastError
()
==
ERROR_MOD_NOT_FOUND
,
ok
(
GetLastError
()
==
ERROR_MOD_NOT_FOUND
||
"Expected ERROR_MOD_NOT_FOUND, got %d
\n
"
,
GetLastError
());
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
/* win9x */
"Expected ERROR_MOD_NOT_FOUND or ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
());
/* empty lpFileName */
/* empty lpFileName */
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
hmodule
=
LoadLibraryExA
(
""
,
NULL
,
0
);
hmodule
=
LoadLibraryExA
(
""
,
NULL
,
0
);
ok
(
hmodule
==
0
,
"Expected 0, got %p
\n
"
,
hmodule
);
ok
(
hmodule
==
0
,
"Expected 0, got %p
\n
"
,
hmodule
);
ok
(
GetLastError
()
==
ERROR_MOD_NOT_FOUND
,
ok
(
GetLastError
()
==
ERROR_MOD_NOT_FOUND
||
"Expected ERROR_MOD_NOT_FOUND, got %d
\n
"
,
GetLastError
());
GetLastError
()
==
ERROR_DLL_NOT_FOUND
,
/* win9x */
"Expected ERROR_MOD_NOT_FOUND or ERROR_DLL_NOT_FOUND, got %d
\n
"
,
GetLastError
());
/* hFile is non-NULL */
/* hFile is non-NULL */
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
hmodule
=
LoadLibraryExA
(
"testfile.dll"
,
hfile
,
0
);
hmodule
=
LoadLibraryExA
(
"testfile.dll"
,
hfile
,
0
);
ok
(
hmodule
==
0
,
"Expected 0, got %p
\n
"
,
hmodule
);
ok
(
hmodule
==
0
,
"Expected 0, got %p
\n
"
,
hmodule
);
ok
(
GetLastError
()
==
ERROR_SHARING_VIOLATION
||
ok
(
GetLastError
()
==
ERROR_SHARING_VIOLATION
||
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
/* win2k3 */
GetLastError
()
==
ERROR_INVALID_PARAMETER
||
/* win2k3 */
"Expected ERROR_SHARING_VIOLATION or ERROR_INVALID_PARAMETER, got %d
\n
"
,
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
/* win9x */
GetLastError
());
"Unexpected last error, got %d
\n
"
,
GetLastError
());
/* try to open a file that is locked */
/* try to open a file that is locked */
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
...
@@ -256,8 +260,10 @@ static void testLoadLibraryEx(void)
...
@@ -256,8 +260,10 @@ static void testLoadLibraryEx(void)
ok
(
hmodule
==
0
,
"Expected 0, got %p
\n
"
,
hmodule
);
ok
(
hmodule
==
0
,
"Expected 0, got %p
\n
"
,
hmodule
);
todo_wine
todo_wine
{
{
ok
(
GetLastError
()
==
ERROR_SHARING_VIOLATION
,
ok
(
GetLastError
()
==
ERROR_SHARING_VIOLATION
||
"Expected ERROR_SHARING_VIOLATION, got %d
\n
"
,
GetLastError
());
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
/* win9x */
"Expected ERROR_SHARING_VIOLATION or ERROR_FILE_NOT_FOUND, got %d
\n
"
,
GetLastError
());
}
}
/* lpFileName does not matter */
/* lpFileName does not matter */
...
@@ -277,8 +283,10 @@ static void testLoadLibraryEx(void)
...
@@ -277,8 +283,10 @@ static void testLoadLibraryEx(void)
ok
(
hmodule
==
0
,
"Expected 0, got %p
\n
"
,
hmodule
);
ok
(
hmodule
==
0
,
"Expected 0, got %p
\n
"
,
hmodule
);
todo_wine
todo_wine
{
{
ok
(
GetLastError
()
==
ERROR_FILE_INVALID
,
ok
(
GetLastError
()
==
ERROR_FILE_INVALID
||
"Expected ERROR_FILE_INVALID, got %d
\n
"
,
GetLastError
());
GetLastError
()
==
ERROR_BAD_FORMAT
,
/* win9x */
"Expected ERROR_FILE_INVALID or ERROR_BAD_FORMAT, got %d
\n
"
,
GetLastError
());
}
}
DeleteFileA
(
"testfile.dll"
);
DeleteFileA
(
"testfile.dll"
);
...
...
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