Module: wine Branch: master Commit: c1dac18c6ae9b19b1549242867e7707807041f2a URL: http://source.winehq.org/git/wine.git/?a=commit;h=c1dac18c6ae9b19b1549242867...
Author: Akihiro Sagawa sagawa.aki@gmail.com Date: Wed Nov 15 00:18:47 2017 +0900
imm32/tests: Add a skip message when composition string isn't available.
Signed-off-by: Akihiro Sagawa sagawa.aki@gmail.com Signed-off-by: Aric Stewart aric@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/imm32/tests/imm32.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/dlls/imm32/tests/imm32.c b/dlls/imm32/tests/imm32.c index b02f85d..99d95c1 100644 --- a/dlls/imm32/tests/imm32.c +++ b/dlls/imm32/tests/imm32.c @@ -361,11 +361,19 @@ static void test_ImmGetCompositionString(void) static const WCHAR string[] = {'w','i','n','e',0x65e5,0x672c,0x8a9e}; char cstring[20]; WCHAR wstring[20]; - DWORD len; - DWORD alen,wlen; + LONG len; + LONG alen,wlen; + BOOL ret;
imc = ImmGetContext(hwnd); - ImmSetCompositionStringW(imc, SCS_SETSTR, string, sizeof(string), NULL,0); + ret = ImmSetCompositionStringW(imc, SCS_SETSTR, string, sizeof(string), NULL,0); + if (!ret) { + win_skip("Composition isn't supported\n"); + ImmReleaseContext(hwnd, imc); + return; + } + msg_spy_flush_msgs(); + alen = ImmGetCompositionStringA(imc, GCS_COMPSTR, cstring, 20); wlen = ImmGetCompositionStringW(imc, GCS_COMPSTR, wstring, 20); /* windows machines without any IME installed just return 0 above */ @@ -376,6 +384,9 @@ static void test_ImmGetCompositionString(void) len = ImmGetCompositionStringA(imc, GCS_COMPATTR, NULL, 0); ok(len==alen,"GCS_COMPATTR(A) not returning correct count\n"); } + else + win_skip("Composition string isn't available\n"); + ImmReleaseContext(hwnd, imc); }