Commit b413d497 authored by Santino Mazza's avatar Santino Mazza Committed by Alexandre Julliard

mlang/tests: Test GetStrCodePages with different codepages character.

parent 03d616b4
......@@ -1163,7 +1163,7 @@ static void IMLangFontLink_Test(IMLangFontLink* iMLFL)
DWORD dwCodePages, dwManyCodePages;
DWORD dwCmpCodePages;
UINT CodePage;
static const WCHAR str[] = { 'd', 0x0436, 0xff90 };
static const WCHAR str[] = { 'd', 0x0436, 0xff90, 0x0160 };
LONG processed;
HRESULT ret;
......@@ -1220,6 +1220,19 @@ static void IMLangFontLink_Test(IMLangFontLink* iMLFL)
ok(dwCodePages == dwCmpCodePages, "expected %lx, got %lx\n", dwCmpCodePages, dwCodePages);
ok(processed == 1, "expected 1, got %ld\n", processed);
/* Latin 2 */
dwCmpCodePages = FS_LATIN1 | FS_LATIN2 | FS_TURKISH | FS_BALTIC;
ret = IMLangFontLink_GetCharCodePages(iMLFL, 0x0160, &dwCodePages);
ok(ret == S_OK, "IMLangFontLink_GetCharCodePages error %lx\n", ret);
ok(dwCodePages == dwCmpCodePages, "expected %lx, got %lx\n", dwCmpCodePages, dwCodePages);
dwCodePages = 0;
processed = 0;
ret = IMLangFontLink_GetStrCodePages(iMLFL, &str[3], 1, 0, &dwCodePages, &processed);
ok(ret == S_OK, "IMLangFontLink_GetStrCodePages error %lx\n", ret);
ok(dwCodePages == dwCmpCodePages, "expected %lx, got %lx\n", dwCmpCodePages, dwCodePages);
ok(processed == 1, "expected 1, got %ld\n", processed);
/* Cyrillic */
dwCmpCodePages = FS_CYRILLIC | FS_JISJAPAN | FS_CHINESESIMP | FS_WANSUNG;
ret = IMLangFontLink_GetCharCodePages(iMLFL, 0x0436, &dwCodePages);
......@@ -1262,6 +1275,14 @@ static void IMLangFontLink_Test(IMLangFontLink* iMLFL)
ok(dwCodePages == dwCmpCodePages, "expected %lx, got %lx\n", dwCmpCodePages, dwCodePages);
ok(processed == 3, "expected 3, got %ld\n", processed);
dwCmpCodePages = FS_JISJAPAN;
dwCodePages = 0;
processed = 0;
ret = IMLangFontLink_GetStrCodePages(iMLFL, str, 4, 0, &dwCodePages, &processed);
ok(ret == S_OK, "IMLangFontLink_GetStrCodePages error %lx\n", ret);
todo_wine ok(dwCodePages == dwCmpCodePages, "expected %lx, got %lx\n", dwCmpCodePages, dwCodePages);
todo_wine ok(processed == 3, "expected 3, got %ld\n", processed);
dwCodePages = 0xffff;
processed = -1;
ret = IMLangFontLink_GetStrCodePages(iMLFL, &str[2], 1, 0, &dwCodePages, &processed);
......
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