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
ae3c49d8
Commit
ae3c49d8
authored
Oct 07, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Oct 07, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Add a test for file position after NtWriteFile in FILE_APPEND_DATA mode.
parent
0160b9a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
5 deletions
+25
-5
file.c
dlls/ntdll/tests/file.c
+25
-5
No files found.
dlls/ntdll/tests/file.c
View file @
ae3c49d8
...
...
@@ -857,6 +857,7 @@ static void append_file_test(void)
IO_STATUS_BLOCK
iosb
;
LARGE_INTEGER
offset
;
char
path
[
MAX_PATH
],
buffer
[
MAX_PATH
],
buf
[
16
];
DWORD
ret
;
GetTempPathA
(
MAX_PATH
,
path
);
GetTempFileNameA
(
path
,
"foo"
,
0
,
buffer
);
...
...
@@ -866,10 +867,10 @@ static void append_file_test(void)
U
(
iosb
).
Status
=
-
1
;
iosb
.
Information
=
-
1
;
status
=
pNtWriteFile
(
handle
,
NULL
,
NULL
,
NULL
,
&
iosb
,
text
,
3
,
NULL
,
NULL
);
status
=
pNtWriteFile
(
handle
,
NULL
,
NULL
,
NULL
,
&
iosb
,
text
,
2
,
NULL
,
NULL
);
ok
(
status
==
STATUS_SUCCESS
,
"NtWriteFile error %#x
\n
"
,
status
);
ok
(
iosb
.
Status
==
STATUS_SUCCESS
,
"expected STATUS_SUCCESS, got %#x
\n
"
,
iosb
.
Status
);
ok
(
iosb
.
Information
==
3
,
"expected 3
, got %lu
\n
"
,
iosb
.
Information
);
ok
(
iosb
.
Information
==
2
,
"expected 2
, got %lu
\n
"
,
iosb
.
Information
);
CloseHandle
(
handle
);
...
...
@@ -880,14 +881,33 @@ static void append_file_test(void)
U
(
iosb
).
Status
=
-
1
;
iosb
.
Information
=
-
1
;
offset
.
QuadPart
=
0
;
status
=
pNtWriteFile
(
handle
,
NULL
,
NULL
,
NULL
,
&
iosb
,
text
+
3
,
3
,
&
offset
,
NULL
);
offset
.
QuadPart
=
1
;
status
=
pNtWriteFile
(
handle
,
NULL
,
NULL
,
NULL
,
&
iosb
,
text
+
2
,
2
,
&
offset
,
NULL
);
todo_wine
ok
(
status
==
STATUS_SUCCESS
,
"NtWriteFile error %#x
\n
"
,
status
);
todo_wine
ok
(
iosb
.
Status
==
STATUS_SUCCESS
,
"expected STATUS_SUCCESS, got %#x
\n
"
,
iosb
.
Status
);
todo_wine
ok
(
iosb
.
Information
==
3
,
"expected 3, got %lu
\n
"
,
iosb
.
Information
);
ok
(
iosb
.
Information
==
2
,
"expected 2, got %lu
\n
"
,
iosb
.
Information
);
ret
=
SetFilePointer
(
handle
,
0
,
NULL
,
FILE_CURRENT
);
todo_wine
ok
(
ret
==
4
,
"expected 4, got %u
\n
"
,
ret
);
U
(
iosb
).
Status
=
-
1
;
iosb
.
Information
=
-
1
;
offset
.
QuadPart
=
3
;
status
=
pNtWriteFile
(
handle
,
NULL
,
NULL
,
NULL
,
&
iosb
,
text
+
4
,
2
,
&
offset
,
NULL
);
todo_wine
ok
(
status
==
STATUS_SUCCESS
,
"NtWriteFile error %#x
\n
"
,
status
);
todo_wine
ok
(
iosb
.
Status
==
STATUS_SUCCESS
,
"expected STATUS_SUCCESS, got %#x
\n
"
,
iosb
.
Status
);
todo_wine
ok
(
iosb
.
Information
==
2
,
"expected 2, got %lu
\n
"
,
iosb
.
Information
);
ret
=
SetFilePointer
(
handle
,
0
,
NULL
,
FILE_CURRENT
);
todo_wine
ok
(
ret
==
6
,
"expected 6, got %u
\n
"
,
ret
);
CloseHandle
(
handle
);
...
...
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