Giovanni Mascellani : dwrite/tests: Do not assume that fonts have a en-us name.

Alexandre Julliard julliard at winehq.org
Thu Mar 4 15:53:36 CST 2021


Module: wine
Branch: master
Commit: 0e4172a0c22a6f293cc3c5e1de265b2a5b480880
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=0e4172a0c22a6f293cc3c5e1de265b2a5b480880

Author: Giovanni Mascellani <gmascellani at codeweavers.com>
Date:   Wed Mar  3 12:38:50 2021 +0100

dwrite/tests: Do not assume that fonts have a en-us name.

Signed-off-by: Giovanni Mascellani <gmascellani at codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dwrite/tests/analyzer.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dlls/dwrite/tests/analyzer.c b/dlls/dwrite/tests/analyzer.c
index 6dd251270c7..0294bbfb719 100644
--- a/dlls/dwrite/tests/analyzer.c
+++ b/dlls/dwrite/tests/analyzer.c
@@ -1500,7 +1500,10 @@ static void get_enus_string(IDWriteLocalizedStrings *strings, WCHAR *buff, unsig
 
     hr = IDWriteLocalizedStrings_FindLocaleName(strings, L"en-us", &index, &exists);
     ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
-    ok(exists, "Failed to find locale name %d.\n", exists);
+
+    /* Not all fonts have an en-us name! */
+    if (!exists)
+        index = 0;
 
     hr = IDWriteLocalizedStrings_GetString(strings, index, buff, size);
     ok(hr == S_OK, "Failed to get name string, hr %#x.\n", hr);




More information about the wine-cvs mailing list