Module: wine Branch: master Commit: b413d4974af3985507619503e78c3af68cfbdf6d URL: https://gitlab.winehq.org/wine/wine/-/commit/b413d4974af3985507619503e78c3af...
Author: Santino Mazza smazza@codeweavers.com Date: Wed Nov 15 13:46:56 2023 -0300
mlang/tests: Test GetStrCodePages with different codepages character.
---
dlls/mlang/tests/mlang.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/dlls/mlang/tests/mlang.c b/dlls/mlang/tests/mlang.c index da0b87ed729..8e55b07b021 100644 --- a/dlls/mlang/tests/mlang.c +++ b/dlls/mlang/tests/mlang.c @@ -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);