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
e3d1a13b
Commit
e3d1a13b
authored
Jul 15, 2005
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jul 15, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test for handling overlapped buffers by WideCharToMultiByte.
parent
2509c06e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
codepage.c
dlls/kernel/tests/codepage.c
+14
-0
No files found.
dlls/kernel/tests/codepage.c
View file @
e3d1a13b
...
...
@@ -56,7 +56,21 @@ static void test_negative_source_length(void)
"MultiByteToWideChar(-2002): len=%d error=%ld
\n
"
,
len
,
GetLastError
());
}
static
void
test_overlapped_buffers
(
void
)
{
static
const
WCHAR
strW
[]
=
{
'j'
,
'u'
,
's'
,
't'
,
' '
,
'a'
,
' '
,
't'
,
'e'
,
's'
,
't'
,
0
};
static
const
char
strA
[]
=
"just a test"
;
char
buf
[
256
];
int
ret
;
lstrcpyW
((
WCHAR
*
)(
buf
+
1
),
strW
);
ret
=
WideCharToMultiByte
(
CP_ACP
,
0
,
(
WCHAR
*
)(
buf
+
1
),
-
1
,
buf
,
sizeof
(
buf
),
NULL
,
NULL
);
ok
(
ret
==
sizeof
(
strA
),
"unexpected ret %d != %d
\n
"
,
ret
,
sizeof
(
strA
));
ok
(
!
memcmp
(
buf
,
strA
,
sizeof
(
strA
)),
"conversion failed: %s
\n
"
,
buf
);
}
START_TEST
(
codepage
)
{
test_negative_source_length
();
test_overlapped_buffers
();
}
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