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
2cd776ff
Commit
2cd776ff
authored
Apr 06, 2020
by
Andrew Eikum
Committed by
Alexandre Julliard
Apr 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Actually run OpenFile tests.
Signed-off-by:
Andrew Eikum
<
aeikum@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f540d161
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
21 deletions
+10
-21
file.c
dlls/kernel32/tests/file.c
+10
-21
No files found.
dlls/kernel32/tests/file.c
View file @
2cd776ff
...
...
@@ -3352,17 +3352,6 @@ static void test_OpenFile(void)
ofs
.
szPathName
);
}
length
=
GetCurrentDirectoryA
(
MAX_PATH
,
buff
)
+
sizeof
(
filename
);
if
(
length
>=
MAX_PATH
)
{
trace
(
"Buffer too small, requested length = %d, but MAX_PATH = %d. Skipping test.
\n
"
,
length
,
MAX_PATH
);
return
;
}
p
=
buff
+
strlen
(
buff
);
if
(
p
>
buff
&&
p
[
-
1
]
!=
'\\'
)
*
p
++
=
'\\'
;
strcpy
(
p
,
filename
);
memset
(
&
ofs
,
0xA5
,
sizeof
(
ofs
));
SetLastError
(
0xfaceabee
);
/* Create an empty file */
...
...
@@ -3389,8 +3378,8 @@ static void test_OpenFile(void)
ok
(
ofs
.
cBytes
==
sizeof
(
OFSTRUCT
),
"OpenFile set ofs.cBytes to %d
\n
"
,
ofs
.
cBytes
);
ok
(
ofs
.
nErrCode
==
ERROR_SUCCESS
||
broken
(
ofs
.
nErrCode
!=
ERROR_SUCCESS
)
/* win9x */
,
"OpenFile set ofs.nErrCode to %d
\n
"
,
ofs
.
nErrCode
);
ok
(
lstrcmpiA
(
ofs
.
szPathName
,
buff
)
==
0
,
"OpenFile returned '%s', but was expected to return '%s'
\n
"
,
ofs
.
szPathName
,
buff
);
ok
(
lstrcmpiA
(
ofs
.
szPathName
,
filename
)
==
0
,
"OpenFile returned '%s', but was expected to return '%s'
\n
"
,
ofs
.
szPathName
,
filename
);
ret
=
_lclose
(
hFile
);
ok
(
!
ret
,
"_lclose() returns %d
\n
"
,
ret
);
...
...
@@ -3404,8 +3393,8 @@ static void test_OpenFile(void)
ok
(
ofs
.
cBytes
==
sizeof
(
OFSTRUCT
),
"OpenFile set ofs.cBytes to %d
\n
"
,
ofs
.
cBytes
);
ok
(
ofs
.
nErrCode
==
ERROR_SUCCESS
||
broken
(
ofs
.
nErrCode
!=
ERROR_SUCCESS
)
/* win9x */
,
"OpenFile set ofs.nErrCode to %d
\n
"
,
ofs
.
nErrCode
);
ok
(
lstrcmpiA
(
ofs
.
szPathName
,
buff
)
==
0
,
"OpenFile returned '%s', but was expected to return '%s'
\n
"
,
ofs
.
szPathName
,
buff
);
ok
(
lstrcmpiA
(
ofs
.
szPathName
,
filename
)
==
0
,
"OpenFile returned '%s', but was expected to return '%s'
\n
"
,
ofs
.
szPathName
,
filename
);
ret
=
_lclose
(
hFile
);
ok
(
!
ret
,
"_lclose() returns %d
\n
"
,
ret
);
...
...
@@ -3419,8 +3408,8 @@ static void test_OpenFile(void)
ok
(
ofs
.
cBytes
==
sizeof
(
OFSTRUCT
),
"OpenFile set ofs.cBytes to %d
\n
"
,
ofs
.
cBytes
);
ok
(
ofs
.
nErrCode
==
ERROR_SUCCESS
||
broken
(
ofs
.
nErrCode
!=
ERROR_SUCCESS
)
/* win9x */
,
"OpenFile set ofs.nErrCode to %d
\n
"
,
ofs
.
nErrCode
);
ok
(
lstrcmpiA
(
ofs
.
szPathName
,
buff
)
==
0
,
"OpenFile returned '%s', but was expected to return '%s'
\n
"
,
ofs
.
szPathName
,
buff
);
ok
(
lstrcmpiA
(
ofs
.
szPathName
,
filename
)
==
0
,
"OpenFile returned '%s', but was expected to return '%s'
\n
"
,
ofs
.
szPathName
,
filename
);
ret
=
_lclose
(
hFile
);
ok
(
!
ret
,
"_lclose() returns %d
\n
"
,
ret
);
...
...
@@ -3434,8 +3423,8 @@ static void test_OpenFile(void)
ok
(
ofs
.
cBytes
==
sizeof
(
OFSTRUCT
),
"OpenFile set ofs.cBytes to %d
\n
"
,
ofs
.
cBytes
);
ok
(
ofs
.
nErrCode
==
ERROR_SUCCESS
||
broken
(
ofs
.
nErrCode
!=
ERROR_SUCCESS
)
/* win9x */
,
"OpenFile set ofs.nErrCode to %d
\n
"
,
ofs
.
nErrCode
);
ok
(
lstrcmpiA
(
ofs
.
szPathName
,
buff
)
==
0
,
"OpenFile returned '%s', but was expected to return '%s'
\n
"
,
ofs
.
szPathName
,
buff
);
ok
(
lstrcmpiA
(
ofs
.
szPathName
,
filename
)
==
0
,
"OpenFile returned '%s', but was expected to return '%s'
\n
"
,
ofs
.
szPathName
,
filename
);
memset
(
&
ofs
,
0xA5
,
sizeof
(
ofs
));
SetLastError
(
0xfaceabee
);
...
...
@@ -3447,8 +3436,8 @@ static void test_OpenFile(void)
ok
(
ofs
.
cBytes
==
sizeof
(
OFSTRUCT
),
"OpenFile set ofs.cBytes to %d
\n
"
,
ofs
.
cBytes
);
ok
(
ofs
.
nErrCode
==
ERROR_SUCCESS
||
broken
(
ofs
.
nErrCode
!=
ERROR_SUCCESS
)
/* win9x */
,
"OpenFile set ofs.nErrCode to %d
\n
"
,
ofs
.
nErrCode
);
ok
(
lstrcmpiA
(
ofs
.
szPathName
,
buff
)
==
0
,
"OpenFile returned '%s', but was expected to return '%s'
\n
"
,
ofs
.
szPathName
,
buff
);
ok
(
lstrcmpiA
(
ofs
.
szPathName
,
filename
)
==
0
,
"OpenFile returned '%s', but was expected to return '%s'
\n
"
,
ofs
.
szPathName
,
filename
);
retval
=
GetFileAttributesA
(
filename
);
ok
(
retval
==
INVALID_FILE_ATTRIBUTES
,
"GetFileAttributesA succeeded on deleted file
\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