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
cbe3a39b
Commit
cbe3a39b
authored
Jan 20, 2023
by
Akihiro Sagawa
Committed by
Alexandre Julliard
Jan 24, 2023
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Add DBCS WM_CHAR tests for edit control.
parent
17ac4059
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
0 deletions
+53
-0
edit.c
dlls/user32/tests/edit.c
+53
-0
No files found.
dlls/user32/tests/edit.c
View file @
cbe3a39b
...
@@ -3366,6 +3366,58 @@ static void test_wordbreak_proc(void)
...
@@ -3366,6 +3366,58 @@ static void test_wordbreak_proc(void)
DestroyWindow
(
hwnd
);
DestroyWindow
(
hwnd
);
}
}
static
void
test_dbcs_WM_CHAR
(
void
)
{
WCHAR
textW
[]
=
{
0x4e00
,
0x4e8c
,
0x4e09
,
0
};
/* one, two, three */
unsigned
char
bytes
[
7
];
HWND
hwnd
[
2
];
int
i
;
WideCharToMultiByte
(
CP_ACP
,
0
,
textW
,
-
1
,
(
char
*
)
bytes
,
ARRAY_SIZE
(
bytes
),
NULL
,
NULL
);
if
(
!
IsDBCSLeadByte
(
bytes
[
0
]))
{
skip
(
"Skipping DBCS WM_CHAR test in this codepage
\n
"
);
return
;
}
hwnd
[
0
]
=
create_editcontrol
(
ES_AUTOHSCROLL
|
ES_AUTOVSCROLL
,
0
);
hwnd
[
1
]
=
create_editcontrolW
(
ES_AUTOHSCROLL
|
ES_AUTOVSCROLL
,
0
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
hwnd
);
i
++
)
{
const
unsigned
char
*
p
;
WCHAR
strW
[
4
];
char
str
[
7
];
MSG
msg
;
BOOL
r
;
int
n
;
winetest_push_context
(
"%c"
,
i
?
'W'
:
'A'
);
r
=
SetWindowTextA
(
hwnd
[
i
],
""
);
ok
(
r
,
"SetWindowText failed
\n
"
);
for
(
p
=
bytes
;
*
p
;
p
++
)
PostMessageA
(
hwnd
[
i
],
WM_CHAR
,
*
p
,
1
);
while
(
PeekMessageA
(
&
msg
,
hwnd
[
i
],
0
,
0
,
PM_REMOVE
))
DispatchMessageA
(
&
msg
);
n
=
GetWindowTextW
(
hwnd
[
i
],
strW
,
ARRAY_SIZE
(
strW
));
ok
(
n
>
0
,
"GetWindowTextW failed
\n
"
);
todo_wine
ok
(
!
wcscmp
(
strW
,
textW
),
"got %s, expected %s
\n
"
,
wine_dbgstr_w
(
strW
),
wine_dbgstr_w
(
textW
));
n
=
GetWindowTextA
(
hwnd
[
i
],
str
,
ARRAY_SIZE
(
str
));
ok
(
n
>
0
,
"GetWindowText failed
\n
"
);
todo_wine
ok
(
!
strcmp
(
str
,
(
char
*
)
bytes
),
"got %s, expected %s
\n
"
,
wine_dbgstr_a
(
str
),
wine_dbgstr_a
((
char
*
)
bytes
));
DestroyWindow
(
hwnd
[
i
]);
winetest_pop_context
();
}
}
START_TEST
(
edit
)
START_TEST
(
edit
)
{
{
BOOL
b
;
BOOL
b
;
...
@@ -3403,6 +3455,7 @@ START_TEST(edit)
...
@@ -3403,6 +3455,7 @@ START_TEST(edit)
test_paste
();
test_paste
();
test_EM_GETLINE
();
test_EM_GETLINE
();
test_wordbreak_proc
();
test_wordbreak_proc
();
test_dbcs_WM_CHAR
();
UnregisterWindowClasses
();
UnregisterWindowClasses
();
}
}
Vitaly Lipatov
@lav
mentioned in commit
6519feb4
·
Feb 25, 2024
mentioned in commit
6519feb4
mentioned in commit 6519feb40ac9b447ec61f8d7bda5890fd0199310
Toggle commit list
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