[PATCH] Skip tests when IME support is not implemented

Paul Vriens Paul.Vriens.Wine at gmail.com
Sat Sep 20 03:41:01 CDT 2008


---
 dlls/imm32/tests/imm32.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/dlls/imm32/tests/imm32.c b/dlls/imm32/tests/imm32.c
index d0ced5f..7208092 100644
--- a/dlls/imm32/tests/imm32.c
+++ b/dlls/imm32/tests/imm32.c
@@ -135,6 +135,7 @@ static HWND hwnd;
 
 static int init(void) {
     WNDCLASSEX wc;
+    HIMC imc;
 
     wc.cbSize        = sizeof(WNDCLASSEX);
     wc.style         = 0;
@@ -158,6 +159,14 @@ static int init(void) {
     if (!hwnd)
         return 0;
 
+    imc = ImmGetContext(hwnd);
+    if (!imc)
+    {
+        skip("IME support not implemented\n");
+        return 0;
+    }
+    ImmReleaseContext(hwnd, imc);
+
     ShowWindow(hwnd, SW_SHOWNORMAL);
     UpdateWindow(hwnd);
 
-- 
1.5.5.1


--------------090107040604020308030100--



More information about the wine-patches mailing list