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
c880c41f
Commit
c880c41f
authored
Aug 30, 2004
by
Filip Navara
Committed by
Alexandre Julliard
Aug 30, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Don't expect that drive C: exists, use the drive Windows is
installed on instead. - Remove misleading message about file mapping.
parent
ff5ecfd8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
7 deletions
+20
-7
file.c
dlls/kernel/tests/file.c
+20
-7
No files found.
dlls/kernel/tests/file.c
View file @
c880c41f
...
@@ -1103,19 +1103,32 @@ static void test_file_sharing(void)
...
@@ -1103,19 +1103,32 @@ static void test_file_sharing(void)
DeleteFileA
(
filename
);
DeleteFileA
(
filename
);
}
}
static
char
get_windows_drive
()
{
char
windowsdir
[
MAX_PATH
];
GetWindowsDirectory
(
windowsdir
,
sizeof
(
windowsdir
));
return
windowsdir
[
0
];
}
static
void
test_FindFirstFileA
()
static
void
test_FindFirstFileA
()
{
{
HANDLE
handle
;
HANDLE
handle
;
WIN32_FIND_DATAA
search_results
;
WIN32_FIND_DATAA
search_results
;
int
err
;
int
err
;
char
buffer
[
5
]
=
"C:
\\
"
;
handle
=
FindFirstFileA
(
"C:
\\
"
,
&
search_results
);
/* try FindFirstFileA on "C:\" */
buffer
[
0
]
=
get_windows_drive
();
handle
=
FindFirstFileA
(
buffer
,
&
search_results
);
err
=
GetLastError
();
err
=
GetLastError
();
ok
(
handle
==
INVALID_HANDLE_VALUE
,
"FindFirstFile on
R
oot directory should Fail
\n
"
);
ok
(
handle
==
INVALID_HANDLE_VALUE
,
"FindFirstFile on
r
oot directory should Fail
\n
"
);
if
(
handle
==
INVALID_HANDLE_VALUE
)
if
(
handle
==
INVALID_HANDLE_VALUE
)
ok
(
err
==
ERROR_FILE_NOT_FOUND
,
"Bad Error number %d
\n
"
,
err
);
ok
(
err
==
ERROR_FILE_NOT_FOUND
,
"Bad Error number %d
\n
"
,
err
);
handle
=
FindFirstFileA
(
"C:
\\
*"
,
&
search_results
);
ok
(
handle
!=
INVALID_HANDLE_VALUE
,
"FindFirstFile on C:
\\
* should succeed
\n
"
);
/* try FindFirstFileA on "C:\*" */
strcat
(
buffer
,
"*"
);
handle
=
FindFirstFileA
(
buffer
,
&
search_results
);
ok
(
handle
!=
INVALID_HANDLE_VALUE
,
"FindFirstFile on %s should succeed
\n
"
,
buffer
);
ok
(
FindClose
(
handle
)
==
TRUE
,
"Failed to close handle
\n
"
);
ok
(
FindClose
(
handle
)
==
TRUE
,
"Failed to close handle
\n
"
);
}
}
...
@@ -1124,8 +1137,10 @@ static void test_FindNextFileA()
...
@@ -1124,8 +1137,10 @@ static void test_FindNextFileA()
HANDLE
handle
;
HANDLE
handle
;
WIN32_FIND_DATAA
search_results
;
WIN32_FIND_DATAA
search_results
;
int
err
;
int
err
;
char
buffer
[
5
]
=
"C:
\\
*"
;
handle
=
FindFirstFileA
(
"C:
\\
*"
,
&
search_results
);
buffer
[
0
]
=
get_windows_drive
();
handle
=
FindFirstFileA
(
buffer
,
&
search_results
);
ok
(
handle
!=
INVALID_HANDLE_VALUE
,
"FindFirstFile on C:
\\
* should succeed
\n
"
);
ok
(
handle
!=
INVALID_HANDLE_VALUE
,
"FindFirstFile on C:
\\
* should succeed
\n
"
);
while
(
FindNextFile
(
handle
,
&
search_results
))
while
(
FindNextFile
(
handle
,
&
search_results
))
{
{
...
@@ -1173,8 +1188,6 @@ static void test_MapFile()
...
@@ -1173,8 +1188,6 @@ static void test_MapFile()
ok
(
test_Mapfile_createtemp
(
&
handle
),
"Couldn't create test file.
\n
"
);
ok
(
test_Mapfile_createtemp
(
&
handle
),
"Couldn't create test file.
\n
"
);
hmap
=
CreateFileMapping
(
handle
,
NULL
,
PAGE_READWRITE
,
0
,
0
,
NULL
);
hmap
=
CreateFileMapping
(
handle
,
NULL
,
PAGE_READWRITE
,
0
,
0
,
NULL
);
ok
(
hmap
==
NULL
,
"Mapping should not work, no name provided.
\n
"
);
ok
(
hmap
==
NULL
,
"mapped zero size file
\n
"
);
ok
(
hmap
==
NULL
,
"mapped zero size file
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_INVALID
,
"not ERROR_FILE_INVALID
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_INVALID
,
"not ERROR_FILE_INVALID
\n
"
);
...
...
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