gdiplus: Add a test for creating a nonexistent font with GdipCreateFontFromLogfont.

Dmitry Timoshkov dmitry at baikal.ru
Mon Jun 18 22:05:17 CDT 2012


---
 dlls/gdiplus/tests/font.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c
index 982db39..03f5769 100644
--- a/dlls/gdiplus/tests/font.c
+++ b/dlls/gdiplus/tests/font.c
@@ -105,6 +105,11 @@ static void test_logfont(void)
     memset(&lfa, 0, sizeof(LOGFONTA));
     memset(&lfa2, 0xff, sizeof(LOGFONTA));
 
+    lstrcpyA(lfa.lfFaceName, "Nonexistent font");
+    stat = GdipCreateFontFromLogfontA(hdc, &lfa, &font);
+    ok(stat == NotTrueTypeFont || broken(stat == FileNotFound), /* before XP */
+       "expected NotTrueTypeFont, got %d\n", stat);
+
     /* empty FaceName */
     lfa.lfFaceName[0] = 0;
     stat = GdipCreateFontFromLogfontA(hdc, &lfa, &font);
-- 
1.7.11




More information about the wine-patches mailing list