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
b000b659
Commit
b000b659
authored
Sep 27, 2023
by
Zhiyi Zhang
Committed by
Alexandre Julliard
Sep 27, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Fix test failures in Hindi UTF-8 and mixed locales.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=55656
parent
c3937d95
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
dialog.c
dlls/user32/tests/dialog.c
+16
-2
No files found.
dlls/user32/tests/dialog.c
View file @
b000b659
...
...
@@ -38,6 +38,7 @@
#include "winbase.h"
#include "wingdi.h"
#include "winuser.h"
#include "winnls.h"
#define MAXHWNDS 1024
static
HWND
hwnd
[
MAXHWNDS
];
...
...
@@ -569,13 +570,24 @@ static LRESULT CALLBACK test_control_procA(HWND hwnd, UINT msg, WPARAM wparam, L
static
int
wm_char_count
;
static
BOOL
is_cjk
(
void
)
{
int
lang_id
=
PRIMARYLANGID
(
GetUserDefaultLangID
());
if
(
lang_id
==
LANG_CHINESE
||
lang_id
==
LANG_JAPANESE
||
lang_id
==
LANG_KOREAN
)
return
TRUE
;
return
FALSE
;
}
static
LRESULT
CALLBACK
test_IsDialogMessageA_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wparam
,
LPARAM
lparam
)
{
switch
(
msg
)
{
case
WM_CHAR
:
if
(
GetSystemMetrics
(
SM_DBCSENABLED
))
if
(
is_cjk
(
))
ok
(
wparam
==
0x5b57
,
"Got unexpected wparam %#Ix.
\n
"
,
wparam
);
else
if
(
PRIMARYLANGID
(
GetUserDefaultLangID
())
==
LANG_HINDI
&&
GetACP
()
==
CP_UTF8
)
ok
(
wparam
==
0xfffd
,
"Got unexpected wparam %#Ix.
\n
"
,
wparam
);
else
ok
(
wparam
==
0x3f
,
"Got unexpected wparam %#Ix.
\n
"
,
wparam
);
wm_char_count
++
;
...
...
@@ -863,8 +875,10 @@ static void test_IsDialogMessage(void)
{
if
(
msg
.
message
==
WM_CHAR
)
{
if
(
GetSystemMetrics
(
SM_DBCSENABLED
))
if
(
is_cjk
(
))
ok
(
msg
.
wParam
!=
0x3f
&&
msg
.
wParam
!=
0x5b57
,
"Got unexpected wparam %#Ix.
\n
"
,
msg
.
wParam
);
else
if
(
PRIMARYLANGID
(
GetUserDefaultLangID
())
==
LANG_HINDI
&&
GetACP
()
==
CP_UTF8
)
ok
(
msg
.
wParam
==
0x97ade5
,
"Got unexpected wparam %#Ix.
\n
"
,
msg
.
wParam
);
else
ok
(
msg
.
wParam
==
0x3f
,
"Got unexpected wparam %#Ix.
\n
"
,
msg
.
wParam
);
ret
=
IsDialogMessageA
(
g_hwndMain
,
&
msg
);
...
...
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