riched20/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:16 +08:00 committed by Alexandre Julliard
parent 51098fcd94
commit fb304e0e4e
1 changed files with 13 additions and 0 deletions

View File

@ -1542,6 +1542,19 @@ static void test_EM_GETTEXTRANGE(void)
ok(result == strlen(text2), "EM_GETTEXTRANGE returned %ld\n", result);
ok(!strcmp(text2, 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);
todo_wine ok(result == 5, "EM_GETTEXTRANGE returned %ld\n", result);
todo_wine ok(!strcmp("ef\x8e\xf0g", buffer), "EM_GETTEXTRANGE filled %s\n", buffer);
}
DestroyWindow(hwndRichEdit);
}