Akihiro Sagawa : imm32/tests: Add a skip message when composition string isn't available.

Alexandre Julliard julliard at winehq.org
Sun Mar 18 09:02:31 CDT 2018


Module: wine
Branch: oldstable
Commit: 9b0109da6230e93258d94f51a3aa687f8b8b9dc4
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=9b0109da6230e93258d94f51a3aa687f8b8b9dc4

Author: Akihiro Sagawa <sagawa.aki at 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 at gmail.com>
Signed-off-by: Aric Stewart <aric at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit c1dac18c6ae9b19b1549242867e7707807041f2a)
Signed-off-by: Michael Stefaniuc <mstefani at 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);
 }
 




More information about the wine-cvs mailing list