Commit 4e8dcf89 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

mlang/tests: Skip testing a codepage returning the buggy, legacy unicodeFEFF…

mlang/tests: Skip testing a codepage returning the buggy, legacy unicodeFEFF charset (only appears to exist on windows 2008).
parent c209245f
...@@ -330,6 +330,7 @@ static void test_EnumCodePages(IMultiLanguage2 *iML2, DWORD flags) ...@@ -330,6 +330,7 @@ static void test_EnumCodePages(IMultiLanguage2 *iML2, DWORD flags)
BOOL convertible; BOOL convertible;
HRESULT check = S_OK; HRESULT check = S_OK;
static const WCHAR autoW[] = {'_','a','u','t','o',0}; static const WCHAR autoW[] = {'_','a','u','t','o',0};
static const WCHAR feffW[] = {'u','n','i','c','o','d','e','F','E','F','F',0};
#ifdef DUMP_CP_INFO #ifdef DUMP_CP_INFO
trace("MIMECPINFO #%u:\n" trace("MIMECPINFO #%u:\n"
...@@ -390,83 +391,98 @@ static void test_EnumCodePages(IMultiLanguage2 *iML2, DWORD flags) ...@@ -390,83 +391,98 @@ static void test_EnumCodePages(IMultiLanguage2 *iML2, DWORD flags)
else else
trace("IsValidCodePage failed for cp %u\n", cpinfo[i].uiCodePage); trace("IsValidCodePage failed for cp %u\n", cpinfo[i].uiCodePage);
ret = IMultiLanguage2_GetCharsetInfo(iML2, cpinfo[i].wszWebCharset, &mcsi); if (memcmp(cpinfo[i].wszWebCharset,feffW,sizeof(WCHAR)*11)==0)
/* _autoxxx charsets are a fake and GetCharsetInfo fails for them */ skip("Legacy windows bug returning invalid charset of unicodeFEFF\n");
if (memcmp(cpinfo[i].wszWebCharset, autoW, 5 * sizeof(WCHAR))) else
{ {
ok (ret == S_OK, "IMultiLanguage2_GetCharsetInfo failed: %08x\n", ret); ret = IMultiLanguage2_GetCharsetInfo(iML2, cpinfo[i].wszWebCharset, &mcsi);
#ifdef DUMP_CP_INFO /* _autoxxx charsets are a fake and GetCharsetInfo fails for them */
trace("%s: %u %u %s\n", wine_dbgstr_w(cpinfo[i].wszWebCharset), mcsi.uiCodePage, mcsi.uiInternetEncoding, wine_dbgstr_w(mcsi.wszCharset)); if (memcmp(cpinfo[i].wszWebCharset, autoW, 5 * sizeof(WCHAR)))
#endif {
ok(!lstrcmpiW(cpinfo[i].wszWebCharset, mcsi.wszCharset), ok (ret == S_OK, "IMultiLanguage2_GetCharsetInfo failed: %08x\n", ret);
#ifdef DUMP_CP_INFO #ifdef DUMP_CP_INFO
"%s != %s\n", trace("%s: %u %u %s\n", wine_dbgstr_w(cpinfo[i].wszWebCharset), mcsi.uiCodePage, mcsi.uiInternetEncoding, wine_dbgstr_w(mcsi.wszCharset));
wine_dbgstr_w(cpinfo[i].wszWebCharset), wine_dbgstr_w(mcsi.wszCharset)); #endif
#else ok(!lstrcmpiW(cpinfo[i].wszWebCharset, mcsi.wszCharset),
"wszWebCharset mismatch\n"); #ifdef DUMP_CP_INFO
#endif "%s != %s\n",
wine_dbgstr_w(cpinfo[i].wszWebCharset), wine_dbgstr_w(mcsi.wszCharset));
if (0) #else
{ "wszWebCharset mismatch\n");
/* native mlang returns completely messed up encodings in some cases */ #endif
ok(mcsi.uiInternetEncoding == cpinfo[i].uiCodePage || mcsi.uiInternetEncoding == cpinfo[i].uiFamilyCodePage,
"%u != %u || %u\n", mcsi.uiInternetEncoding, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage); if (0)
ok(mcsi.uiCodePage == cpinfo[i].uiCodePage || mcsi.uiCodePage == cpinfo[i].uiFamilyCodePage, {
"%u != %u || %u\n", mcsi.uiCodePage, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage); /* native mlang returns completely messed up encodings in some cases */
ok(mcsi.uiInternetEncoding == cpinfo[i].uiCodePage || mcsi.uiInternetEncoding == cpinfo[i].uiFamilyCodePage,
"%u != %u || %u\n", mcsi.uiInternetEncoding, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage);
ok(mcsi.uiCodePage == cpinfo[i].uiCodePage || mcsi.uiCodePage == cpinfo[i].uiFamilyCodePage,
"%u != %u || %u\n", mcsi.uiCodePage, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage);
}
} }
} }
ret = IMultiLanguage2_GetCharsetInfo(iML2, cpinfo[i].wszHeaderCharset, &mcsi);
/* _autoxxx charsets are a fake and GetCharsetInfo fails for them */
if (memcmp(cpinfo[i].wszHeaderCharset, autoW, 5 * sizeof(WCHAR)))
{
ok (ret == S_OK, "IMultiLanguage2_GetCharsetInfo failed: %08x\n", ret);
#ifdef DUMP_CP_INFO
trace("%s: %u %u %s\n", wine_dbgstr_w(cpinfo[i].wszHeaderCharset), mcsi.uiCodePage, mcsi.uiInternetEncoding, wine_dbgstr_w(mcsi.wszCharset));
#endif
ok(!lstrcmpiW(cpinfo[i].wszHeaderCharset, mcsi.wszCharset),
#ifdef DUMP_CP_INFO
"%s != %s\n",
wine_dbgstr_w(cpinfo[i].wszHeaderCharset), wine_dbgstr_w(mcsi.wszCharset));
#else
"wszHeaderCharset mismatch\n");
#endif
if (0)
{
/* native mlang returns completely messed up encodings in some cases */
ok(mcsi.uiInternetEncoding == cpinfo[i].uiCodePage || mcsi.uiInternetEncoding == cpinfo[i].uiFamilyCodePage,
"%u != %u || %u\n", mcsi.uiInternetEncoding, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage);
ok(mcsi.uiCodePage == cpinfo[i].uiCodePage || mcsi.uiCodePage == cpinfo[i].uiFamilyCodePage,
"%u != %u || %u\n", mcsi.uiCodePage, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage);
}
}
ret = IMultiLanguage2_GetCharsetInfo(iML2, cpinfo[i].wszBodyCharset, &mcsi); if (memcmp(cpinfo[i].wszHeaderCharset,feffW,sizeof(WCHAR)*11)==0)
/* _autoxxx charsets are a fake and GetCharsetInfo fails for them */ skip("Legacy windows bug returning invalid charset of unicodeFEFF\n");
if (memcmp(cpinfo[i].wszBodyCharset, autoW, 5 * sizeof(WCHAR))) else
{ {
ok (ret == S_OK, "IMultiLanguage2_GetCharsetInfo failed: %08x\n", ret); ret = IMultiLanguage2_GetCharsetInfo(iML2, cpinfo[i].wszHeaderCharset, &mcsi);
#ifdef DUMP_CP_INFO /* _autoxxx charsets are a fake and GetCharsetInfo fails for them */
trace("%s: %u %u %s\n", wine_dbgstr_w(cpinfo[i].wszBodyCharset), mcsi.uiCodePage, mcsi.uiInternetEncoding, wine_dbgstr_w(mcsi.wszCharset)); if (memcmp(cpinfo[i].wszHeaderCharset, autoW, 5 * sizeof(WCHAR)))
#endif {
ok(!lstrcmpiW(cpinfo[i].wszBodyCharset, mcsi.wszCharset), ok (ret == S_OK, "IMultiLanguage2_GetCharsetInfo failed: %08x\n", ret);
#ifdef DUMP_CP_INFO #ifdef DUMP_CP_INFO
"%s != %s\n", trace("%s: %u %u %s\n", wine_dbgstr_w(cpinfo[i].wszHeaderCharset), mcsi.uiCodePage, mcsi.uiInternetEncoding, wine_dbgstr_w(mcsi.wszCharset));
wine_dbgstr_w(cpinfo[i].wszBodyCharset), wine_dbgstr_w(mcsi.wszCharset)); #endif
#else ok(!lstrcmpiW(cpinfo[i].wszHeaderCharset, mcsi.wszCharset),
"wszBodyCharset mismatch\n"); #ifdef DUMP_CP_INFO
#endif "%s != %s\n",
wine_dbgstr_w(cpinfo[i].wszHeaderCharset), wine_dbgstr_w(mcsi.wszCharset));
#else
"wszHeaderCharset mismatch\n");
#endif
if (0)
{
/* native mlang returns completely messed up encodings in some cases */
ok(mcsi.uiInternetEncoding == cpinfo[i].uiCodePage || mcsi.uiInternetEncoding == cpinfo[i].uiFamilyCodePage,
"%u != %u || %u\n", mcsi.uiInternetEncoding, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage);
ok(mcsi.uiCodePage == cpinfo[i].uiCodePage || mcsi.uiCodePage == cpinfo[i].uiFamilyCodePage,
"%u != %u || %u\n", mcsi.uiCodePage, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage);
}
}
}
if (0) if (memcmp(cpinfo[i].wszBodyCharset,feffW,sizeof(WCHAR)*11)==0)
{ skip("Legacy windows bug returning invalid charset of unicodeFEFF\n");
/* native mlang returns completely messed up encodings in some cases */ else
ok(mcsi.uiInternetEncoding == cpinfo[i].uiCodePage || mcsi.uiInternetEncoding == cpinfo[i].uiFamilyCodePage, {
"%u != %u || %u\n", mcsi.uiInternetEncoding, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage); ret = IMultiLanguage2_GetCharsetInfo(iML2, cpinfo[i].wszBodyCharset, &mcsi);
ok(mcsi.uiCodePage == cpinfo[i].uiCodePage || mcsi.uiCodePage == cpinfo[i].uiFamilyCodePage, /* _autoxxx charsets are a fake and GetCharsetInfo fails for them */
"%u != %u || %u\n", mcsi.uiCodePage, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage); if (memcmp(cpinfo[i].wszBodyCharset, autoW, 5 * sizeof(WCHAR)))
} {
} ok (ret == S_OK, "IMultiLanguage2_GetCharsetInfo failed: %08x\n", ret);
#ifdef DUMP_CP_INFO
trace("%s: %u %u %s\n", wine_dbgstr_w(cpinfo[i].wszBodyCharset), mcsi.uiCodePage, mcsi.uiInternetEncoding, wine_dbgstr_w(mcsi.wszCharset));
#endif
ok(!lstrcmpiW(cpinfo[i].wszBodyCharset, mcsi.wszCharset),
#ifdef DUMP_CP_INFO
"%s != %s\n",
wine_dbgstr_w(cpinfo[i].wszBodyCharset), wine_dbgstr_w(mcsi.wszCharset));
#else
"wszBodyCharset mismatch\n");
#endif
if (0)
{
/* native mlang returns completely messed up encodings in some cases */
ok(mcsi.uiInternetEncoding == cpinfo[i].uiCodePage || mcsi.uiInternetEncoding == cpinfo[i].uiFamilyCodePage,
"%u != %u || %u\n", mcsi.uiInternetEncoding, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage);
ok(mcsi.uiCodePage == cpinfo[i].uiCodePage || mcsi.uiCodePage == cpinfo[i].uiFamilyCodePage,
"%u != %u || %u\n", mcsi.uiCodePage, cpinfo[i].uiCodePage, cpinfo[i].uiFamilyCodePage);
}
}
}
} }
/* now IEnumCodePage_Next should fail, since pointer is at the end */ /* now IEnumCodePage_Next should fail, since pointer is at the end */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment