mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 08:20:20 +00:00
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>
This commit is contained in:
parent
00eba519dc
commit
c1dac18c6a
|
@ -361,11 +361,19 @@ static void test_ImmGetCompositionString(void)
|
||||||
static const WCHAR string[] = {'w','i','n','e',0x65e5,0x672c,0x8a9e};
|
static const WCHAR string[] = {'w','i','n','e',0x65e5,0x672c,0x8a9e};
|
||||||
char cstring[20];
|
char cstring[20];
|
||||||
WCHAR wstring[20];
|
WCHAR wstring[20];
|
||||||
DWORD len;
|
LONG len;
|
||||||
DWORD alen,wlen;
|
LONG alen,wlen;
|
||||||
|
BOOL ret;
|
||||||
|
|
||||||
imc = ImmGetContext(hwnd);
|
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);
|
alen = ImmGetCompositionStringA(imc, GCS_COMPSTR, cstring, 20);
|
||||||
wlen = ImmGetCompositionStringW(imc, GCS_COMPSTR, wstring, 20);
|
wlen = ImmGetCompositionStringW(imc, GCS_COMPSTR, wstring, 20);
|
||||||
/* windows machines without any IME installed just return 0 above */
|
/* 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);
|
len = ImmGetCompositionStringA(imc, GCS_COMPATTR, NULL, 0);
|
||||||
ok(len==alen,"GCS_COMPATTR(A) not returning correct count\n");
|
ok(len==alen,"GCS_COMPATTR(A) not returning correct count\n");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
win_skip("Composition string isn't available\n");
|
||||||
|
|
||||||
ImmReleaseContext(hwnd, imc);
|
ImmReleaseContext(hwnd, imc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue