riched32/tests: Test EM_GETTEXTRANGE with multibyte character.

Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jactry Zeng 2015-12-22 23:13:42 +08:00 committed by Alexandre Julliard
parent fb304e0e4e
commit 4871b0236b
1 changed files with 12 additions and 0 deletions

View File

@ -566,6 +566,18 @@ static void test_EM_GETTEXTRANGE(void)
ok(!strcmp(expect3, buffer), "EM_GETTEXTRANGE filled %s\n", buffer);
/* Test with multibyte character */
if (!is_lang_japanese)
skip("Skip multibyte character tests on non-Japanese platform\n");
else
{
SendMessageA(hwndRichEdit, WM_SETTEXT, 0, (LPARAM)"abcdef\x8e\xf0ghijk");
textRange.chrg.cpMin = 4;
textRange.chrg.cpMax = 8;
result = SendMessageA(hwndRichEdit, EM_GETTEXTRANGE, 0, (LPARAM)&textRange);
ok(result == 4, "EM_GETTEXTRANGE returned %ld\n", result);
todo_wine ok(!strcmp("ef\x8e\xf0", buffer), "EM_GETTEXTRANGE filled %s\n", buffer);
}
DestroyWindow(hwndRichEdit);
}