https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8d38373fd29b32f00bfb3…
commit 8d38373fd29b32f00bfb396705430a9022740fb5
Author:     Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Fri May 31 16:28:07 2019 +0900
Commit:     Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Fri May 31 16:28:07 2019 +0900
    [KERNEL32_APITEST] Check CJK codepage before tests
---
 modules/rostests/apitests/kernel32/ConsoleCP.c | 32 ++++++++++++++++++++++++--
 1 file changed, 30 insertions(+), 2 deletions(-)
diff --git a/modules/rostests/apitests/kernel32/ConsoleCP.c
b/modules/rostests/apitests/kernel32/ConsoleCP.c
index 5d12bd88c5..5580fc189b 100644
--- a/modules/rostests/apitests/kernel32/ConsoleCP.c
+++ b/modules/rostests/apitests/kernel32/ConsoleCP.c
@@ -24,6 +24,20 @@ static const WCHAR ideograph_space = (WCHAR)0x3000;     /* fullwidth
space */
 LCID lcidJapanese = MAKELCID(MAKELANGID(LANG_JAPANESE, SUBLANG_DEFAULT), SORT_DEFAULT);
 LCID lcidRussian  = MAKELCID(MAKELANGID(LANG_RUSSIAN , SUBLANG_DEFAULT), SORT_DEFAULT);
+static BOOL IsCJKCodePage(void)
+{
+    switch (GetOEMCP())
+    {
+    case 936:   // Chinese PRC
+    case 932:   // Japanese
+    case 949:   // Korean
+    case 1361:  // Korean (Johab)
+    case 950:   // Taiwan
+        return TRUE;
+    }
+    return FALSE;
+}
+
 /* Russian Code Page 855 */
 // NOTE that CP 866 can also be used
 static void test_cp855(HANDLE hConOut)
@@ -458,14 +472,28 @@ START_TEST(ConsoleCP)
     ok(hConOut != INVALID_HANDLE_VALUE, "Opening ConOut\n");
     if (IsValidLocale(lcidRussian, LCID_INSTALLED))
-        test_cp855(hConOut);
+    {
+        if (!IsCJKCodePage())
+            test_cp855(hConOut);
+        else
+            skip("Russian testcase is skipped because of CJK\n");
+    }
     else
+    {
         skip("Russian locale is not installed\n");
+    }
     if (IsValidLocale(lcidJapanese, LCID_INSTALLED))
-        test_cp932(hConOut);
+    {
+        if (IsCJKCodePage())
+            test_cp932(hConOut);
+        else
+            skip("Japanese testcase is skipped because of not CJK\n");
+    }
     else
+    {
         skip("Japanese locale is not installed\n");
+    }
     CloseHandle(hConIn);
     CloseHandle(hConOut);