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
9294823a
Commit
9294823a
authored
Nov 07, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 07, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scrrun/tests: Add test of lost trailing byte in unicode srteam.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f2b681db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
filesystem.c
dlls/scrrun/tests/filesystem.c
+26
-0
No files found.
dlls/scrrun/tests/filesystem.c
View file @
9294823a
...
...
@@ -2032,6 +2032,32 @@ static void test_Read(void)
ITextStream_Release
(
stream
);
/* ASCII file, read with Unicode stream */
/* 3. one byte content, 2 are interpreted as a character, 3rd is lost */
hr
=
IFileSystem3_CreateTextFile
(
fs3
,
nameW
,
VARIANT_TRUE
,
VARIANT_FALSE
,
&
stream
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
str
=
SysAllocString
(
L"abc"
);
hr
=
ITextStream_Write
(
stream
,
str
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
SysFreeString
(
str
);
ITextStream_Release
(
stream
);
hr
=
IFileSystem3_OpenTextFile
(
fs3
,
nameW
,
ForReading
,
VARIANT_FALSE
,
TristateTrue
,
&
stream
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
str
=
NULL
;
hr
=
ITextStream_Read
(
stream
,
500
,
&
str
);
ok
(
hr
==
S_FALSE
||
broken
(
hr
==
S_OK
)
/* win2003 */
,
"got 0x%08x
\n
"
,
hr
);
ok
(
SysStringLen
(
str
)
==
1
,
"len = %u
\n
"
,
SysStringLen
(
str
));
SysFreeString
(
str
);
str
=
(
void
*
)
0xdeadbeef
;
hr
=
ITextStream_Read
(
stream
,
500
,
&
str
);
ok
(
hr
==
CTL_E_ENDOFFILE
,
"got 0x%08x
\n
"
,
hr
);
ok
(
str
==
NULL
,
"got %p
\n
"
,
str
);
ITextStream_Release
(
stream
);
DeleteFileW
(
nameW
);
RemoveDirectoryW
(
dirW
);
SysFreeString
(
nameW
);
...
...
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