Module: wine Branch: master Commit: 725cb2f3c088aa33ee2d57c856add4f943c44f02 URL: http://source.winehq.org/git/wine.git/?a=commit;h=725cb2f3c088aa33ee2d57c856...
Author: Greg Geldorp ggeldorp@vmware.com Date: Sun Jan 16 22:16:06 2011 +0100
msvcrt/tests: Use different method to determine non-SBCS locale.
---
dlls/msvcrt/tests/string.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/msvcrt/tests/string.c b/dlls/msvcrt/tests/string.c index 2a5d4fc..b003f5a 100644 --- a/dlls/msvcrt/tests/string.c +++ b/dlls/msvcrt/tests/string.c @@ -20,6 +20,7 @@
#include "wine/test.h" #include "winbase.h" +#include "winnls.h" #include <string.h> #include <mbstring.h> #include <stdlib.h> @@ -194,6 +195,7 @@ static void test_mbcp(void) unsigned char *mbsonlylead = (unsigned char *)"\xb0\0\xb1\xb2 \xb3"; unsigned char buf[16]; int step; + CPINFO cp_info;
/* _mbtype tests */
@@ -357,13 +359,14 @@ static void test_mbcp(void) * we hope the current locale to be SBCS because setlocale(LC_ALL, ".1252") seems not to work yet * (as of Wine 0.9.43) */ - if (*p__mb_cur_max == 1) + GetCPInfo(GetACP(), &cp_info); + if (cp_info.MaxCharSize == 1) { expect_eq(mblen((char *)mbstring, 3), 1, int, "%x"); expect_eq(_mbstrlen((char *)mbstring2), 7, int, "%d"); } else - skip("Current locale has double-byte charset - could leave to false positives\n"); + skip("Current locale has double-byte charset - could lead to false positives\n");
_setmbcp(1361); expect_eq(_ismbblead(0x80), 0, int, "%d");