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
18f7bfb4
Commit
18f7bfb4
authored
May 19, 2003
by
Ferenc Wagner
Committed by
Alexandre Julliard
May 19, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New _lcreat tests for filename ending in a slash and volume label
attribute.
parent
c26b7dba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
file.c
dlls/kernel/tests/file.c
+44
-0
No files found.
dlls/kernel/tests/file.c
View file @
18f7bfb4
...
@@ -193,6 +193,8 @@ static void test__lcreat( void )
...
@@ -193,6 +193,8 @@ static void test__lcreat( void )
HFILE
filehandle
;
HFILE
filehandle
;
char
buffer
[
10000
];
char
buffer
[
10000
];
WIN32_FIND_DATAA
search_results
;
WIN32_FIND_DATAA
search_results
;
char
slashname
[]
=
"testfi/"
;
HANDLE
find
;
filehandle
=
_lcreat
(
filename
,
0
);
filehandle
=
_lcreat
(
filename
,
0
);
if
(
filehandle
==
HFILE_ERROR
)
if
(
filehandle
==
HFILE_ERROR
)
...
@@ -257,6 +259,48 @@ static void test__lcreat( void )
...
@@ -257,6 +259,48 @@ static void test__lcreat( void )
ok
(
INVALID_HANDLE_VALUE
!=
FindFirstFileA
(
filename
,
&
search_results
),
"should STILL be able to find file"
);
ok
(
INVALID_HANDLE_VALUE
!=
FindFirstFileA
(
filename
,
&
search_results
),
"should STILL be able to find file"
);
ok
(
DeleteFileA
(
filename
)
!=
0
,
"DeleteFile failed (%ld)"
,
GetLastError
(
)
);
ok
(
DeleteFileA
(
filename
)
!=
0
,
"DeleteFile failed (%ld)"
,
GetLastError
(
)
);
filehandle
=
_lcreat
(
slashname
,
0
);
/* illegal name */
if
(
HFILE_ERROR
==
filehandle
)
ok
(
0
,
"couldn't create file
\"
%s
\"
(err=%ld)"
,
slashname
,
GetLastError
());
else
{
_lclose
(
filehandle
);
find
=
FindFirstFileA
(
slashname
,
&
search_results
);
if
(
INVALID_HANDLE_VALUE
==
find
)
ok
(
0
,
"file
\"
%s
\"
not found"
,
slashname
);
else
{
ok
(
0
!=
FindClose
(
find
),
"FindClose complains (%ld)"
,
GetLastError
());
slashname
[
strlen
(
slashname
)
-
1
]
=
0
;
ok
(
!
strcmp
(
slashname
,
search_results
.
cFileName
),
"found unexpected name
\"
%s
\"
"
,
search_results
.
cFileName
);
ok
(
FILE_ATTRIBUTE_ARCHIVE
==
search_results
.
dwFileAttributes
,
"attributes of file
\"
%s
\"
are 0x%04lx"
,
search_results
.
cFileName
,
search_results
.
dwFileAttributes
);
}
ok
(
0
!=
DeleteFileA
(
slashname
),
"Can't delete
\"
%s
\"
(%ld)"
,
slashname
,
GetLastError
());
}
filehandle
=
_lcreat
(
filename
,
8
);
/* illegal attribute */
if
(
HFILE_ERROR
==
filehandle
)
ok
(
0
,
"couldn't create volume label
\"
%s
\"
"
,
filename
);
else
{
_lclose
(
filehandle
);
find
=
FindFirstFileA
(
filename
,
&
search_results
);
if
(
INVALID_HANDLE_VALUE
==
find
)
ok
(
0
,
"file
\"
%s
\"
not found"
,
filename
);
else
{
ok
(
0
!=
FindClose
(
find
),
"FindClose complains (%ld)"
,
GetLastError
());
ok
(
!
strcmp
(
filename
,
search_results
.
cFileName
),
"found unexpected name
\"
%s
\"
"
,
search_results
.
cFileName
);
ok
(
FILE_ATTRIBUTE_ARCHIVE
==
search_results
.
dwFileAttributes
,
"attributes of file
\"
%s
\"
are 0x%04lx"
,
search_results
.
cFileName
,
search_results
.
dwFileAttributes
);
}
ok
(
0
!=
DeleteFileA
(
filename
),
"Can't delete
\"
%s
\"
(%ld)"
,
slashname
,
GetLastError
());
}
}
}
...
...
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