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
30c529c9
Commit
30c529c9
authored
Jun 12, 2015
by
Huw Davies
Committed by
Alexandre Julliard
Jun 12, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Use the correct codepage for WM_CHAR tests.
parent
53dbffd3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
msg.c
dlls/user32/tests/msg.c
+16
-3
No files found.
dlls/user32/tests/msg.c
View file @
30c529c9
...
...
@@ -11964,6 +11964,18 @@ static void test_SetForegroundWindow(void)
DestroyWindow
(
hwnd
);
}
static
DWORD
get_input_codepage
(
void
)
{
DWORD
cp
;
int
ret
;
HKL
hkl
=
GetKeyboardLayout
(
0
);
ret
=
GetLocaleInfoW
(
LOWORD
(
hkl
),
LOCALE_IDEFAULTANSICODEPAGE
|
LOCALE_RETURN_NUMBER
,
(
WCHAR
*
)
&
cp
,
sizeof
(
cp
)
/
sizeof
(
WCHAR
)
);
if
(
!
ret
)
cp
=
CP_ACP
;
return
cp
;
}
static
void
test_dbcs_wm_char
(
void
)
{
BYTE
dbch
[
2
];
...
...
@@ -11977,6 +11989,7 @@ static void test_dbcs_wm_char(void)
UINT
i
,
j
,
k
;
struct
message
wmCharSeq
[
2
];
BOOL
ret
;
DWORD
cp
=
get_input_codepage
();
if
(
!
pGetCPInfoExA
)
{
...
...
@@ -11984,7 +11997,7 @@ static void test_dbcs_wm_char(void)
return
;
}
pGetCPInfoExA
(
CP_ACP
,
0
,
&
cpinfo
);
pGetCPInfoExA
(
cp
,
0
,
&
cpinfo
);
if
(
cpinfo
.
MaxCharSize
!=
2
)
{
skip
(
"Skipping DBCS WM_CHAR test in SBCS codepage '%s'
\n
"
,
cpinfo
.
CodePageName
);
...
...
@@ -12002,8 +12015,8 @@ static void test_dbcs_wm_char(void)
WCHAR
wstr
[
2
];
str
[
0
]
=
j
;
str
[
1
]
=
k
;
if
(
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
2
,
wstr
,
2
)
==
1
&&
WideCharToMultiByte
(
CP_ACP
,
0
,
wstr
,
1
,
str
,
2
,
NULL
,
NULL
)
==
2
&&
if
(
MultiByteToWideChar
(
cp
,
0
,
str
,
2
,
wstr
,
2
)
==
1
&&
WideCharToMultiByte
(
cp
,
0
,
wstr
,
1
,
str
,
2
,
NULL
,
NULL
)
==
2
&&
(
BYTE
)
str
[
0
]
==
j
&&
(
BYTE
)
str
[
1
]
==
k
&&
HIBYTE
(
wstr
[
0
])
&&
HIBYTE
(
wstr
[
0
])
!=
0xff
)
{
...
...
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