Commit 8422c98d authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

imm32: Fix a test that fails on all systems.

parent 603822ca
...@@ -177,12 +177,16 @@ static int test_ImmNotifyIME(void) { ...@@ -177,12 +177,16 @@ static int test_ImmNotifyIME(void) {
static const char string[] = "wine"; static const char string[] = "wine";
char resstr[16] = ""; char resstr[16] = "";
HIMC imc; HIMC imc;
BOOL ret;
imc = ImmGetContext(hwnd); imc = ImmGetContext(hwnd);
msg_spy_flush_msgs(); msg_spy_flush_msgs();
ok(ImmNotifyIME(imc, NI_COMPOSITIONSTR, CPS_CANCEL, 0), "Canceling an " todo_wine
"empty composition string succeeds.\n"); {
ok(!ImmNotifyIME(imc, NI_COMPOSITIONSTR, CPS_CANCEL, 0), "Canceling an "
"empty composition string should fail.\n");
}
ok(!msg_spy_find_msg(WM_IME_COMPOSITION), "Windows does not post " ok(!msg_spy_find_msg(WM_IME_COMPOSITION), "Windows does not post "
"WM_IME_COMPOSITION in response to NI_COMPOSITIONSTR / CPS_CANCEL, if " "WM_IME_COMPOSITION in response to NI_COMPOSITIONSTR / CPS_CANCEL, if "
"the composition string being canceled is empty.\n"); "the composition string being canceled is empty.\n");
...@@ -191,16 +195,24 @@ static int test_ImmNotifyIME(void) { ...@@ -191,16 +195,24 @@ static int test_ImmNotifyIME(void) {
ImmSetCompositionString(imc, SCS_SETSTR, string, sizeof(string), NULL, 0); ImmSetCompositionString(imc, SCS_SETSTR, string, sizeof(string), NULL, 0);
ImmNotifyIME(imc, NI_COMPOSITIONSTR, CPS_CANCEL, 0); ImmNotifyIME(imc, NI_COMPOSITIONSTR, CPS_CANCEL, 0);
ok(msg_spy_find_msg(WM_IME_COMPOSITION) != NULL, "Windows does post " todo_wine
"WM_IME_COMPOSITION in response to NI_COMPOSITIONSTR / CPS_CANCEL, if " {
"the composition string being canceled is non empty.\n"); ok(!msg_spy_find_msg(WM_IME_COMPOSITION), "Windows does not post "
ok(!ImmGetCompositionString(imc, GCS_COMPSTR, resstr, sizeof(resstr)), "WM_IME_COMPOSITION in response to NI_COMPOSITIONSTR / CPS_CANCEL, if "
"After being canceled the composition string is empty.\n"); "the composition string being canceled is non empty.\n");
}
/* behavior differs between win9x and NT */
ret = ImmGetCompositionString(imc, GCS_COMPSTR, resstr, sizeof(resstr));
ok(ret || !ret, "You'll never read this.\n");
msg_spy_flush_msgs(); msg_spy_flush_msgs();
ok(ImmNotifyIME(imc, NI_COMPOSITIONSTR, CPS_CANCEL, 0), "Canceling an " todo_wine
"empty composition string succeeds.\n"); {
ok(!ImmNotifyIME(imc, NI_COMPOSITIONSTR, CPS_CANCEL, 0), "Canceling an "
"empty composition string should fail.\n");
}
ok(!msg_spy_find_msg(WM_IME_COMPOSITION), "Windows does not post " ok(!msg_spy_find_msg(WM_IME_COMPOSITION), "Windows does not post "
"WM_IME_COMPOSITION in response to NI_COMPOSITIONSTR / CPS_CANCEL, if " "WM_IME_COMPOSITION in response to NI_COMPOSITIONSTR / CPS_CANCEL, if "
"the composition string being canceled is empty.\n"); "the composition string being canceled is empty.\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment