kernel32: Add test MultiByteToWideChar for code page is 936.
Changhui LIU
chliu027028 at gmail.com
Wed Feb 3 02:03:15 CST 2016
--
Regards,
Changhui Liu
-------------- next part --------------
From b08bb636dd8c4ddba018a0950c2047d75d3bcd8c Mon Sep 17 00:00:00 2001
From: Changhui Liu <liuchanghui at linuxdeepin.com>
Date: Wed, 3 Feb 2016 15:31:46 +0800
Subject: kernel32: Add test MultiByteToWideChar for code page is 936.
To: wine-patches <wine-patches at winehq.org>
Reply-To: wine-devel <wine-devel at winehq.org>
Signed-off-by: Changhui Liu <liuchanghui at linuxdeepin.com>
---
dlls/kernel32/tests/codepage.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/dlls/kernel32/tests/codepage.c b/dlls/kernel32/tests/codepage.c
index 6718a3b..ddd7eb3 100644
--- a/dlls/kernel32/tests/codepage.c
+++ b/dlls/kernel32/tests/codepage.c
@@ -1136,6 +1136,22 @@ static void test_threadcp(void)
SetThreadLocale(last);
}
+static void test_cp936_to_widechar(void)
+{
+ int count = 0;
+ int count2 = 0;
+ WCHAR wide_buf[4];
+ unsigned char buf[] = {0xbf, 0xb4, 0xc7};
+
+ count = MultiByteToWideChar(936, 0, (char*)&buf[0], sizeof(buf), NULL, 0);
+ ok(count > 0, "returned %d (expected > '0')\n", count);
+
+ count2 = MultiByteToWideChar(936, 0, (char*)&buf[0], sizeof(buf), wide_buf, count);
+ todo_wine ok(count2 > 0, "returned %d (expected > '0')\n", count2);
+
+ todo_wine ok(count == count2, "expected twice call result is same\n");
+}
+
START_TEST(codepage)
{
BOOL bUsedDefaultChar;
@@ -1156,4 +1172,6 @@ START_TEST(codepage)
test_undefined_byte_char();
test_threadcp();
+
+ test_cp936_to_widechar();
}
--
1.9.1
More information about the wine-patches
mailing list