Module: wine Branch: master Commit: 2f30f28b04b657e174985d6b34aa59a8f544333b URL: https://source.winehq.org/git/wine.git/?a=commit;h=2f30f28b04b657e174985d6b3...
Author: Francois Gouget fgouget@free.fr Date: Wed Nov 6 16:45:34 2019 +0100
kernel32/tests: Windows 10 dropped support for GetConsoleFontInfo().
Windows 10 1507 still supports it but not 1607+.
Signed-off-by: Francois Gouget fgouget@free.fr Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/kernel32/tests/console.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-)
diff --git a/dlls/kernel32/tests/console.c b/dlls/kernel32/tests/console.c index f85cd44ca7..97bea44e19 100644 --- a/dlls/kernel32/tests/console.c +++ b/dlls/kernel32/tests/console.c @@ -2865,6 +2865,14 @@ static void test_GetConsoleFontInfo(HANDLE std_output) SetLastError(0xdeadbeef); ret = pGetConsoleFontInfo(NULL, FALSE, 0, cfi); ok(!ret, "got %d, expected zero\n", ret); + if (GetLastError() == LOWORD(E_NOTIMPL) /* win10 1709+ */ || + broken(GetLastError() == ERROR_GEN_FAILURE) /* win10 1607 */) + { + skip("GetConsoleFontInfo is not implemented\n"); + SetConsoleScreenBufferSize(std_output, orig_sb_size); + HeapFree(GetProcessHeap(), 0, cfi); + return; + } todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
SetLastError(0xdeadbeef); @@ -2887,14 +2895,11 @@ static void test_GetConsoleFontInfo(HANDLE std_output)
memset(cfi, 0, memsize); ret = pGetConsoleFontInfo(std_output, FALSE, num_fonts, cfi); - todo_wine ok(ret || broken(!ret) /* win10 1809 */, "got %d, expected non-zero\n", ret); - if (ret) - { - todo_wine ok(cfi[index].dwFontSize.X == win_width, "got %d, expected %d\n", - cfi[index].dwFontSize.X, win_width); - todo_wine ok(cfi[index].dwFontSize.Y == win_height, "got %d, expected %d\n", - cfi[index].dwFontSize.Y, win_height); - } + todo_wine ok(ret, "got %d, expected non-zero\n", ret); + todo_wine ok(cfi[index].dwFontSize.X == win_width, "got %d, expected %d\n", + cfi[index].dwFontSize.X, win_width); + todo_wine ok(cfi[index].dwFontSize.Y == win_height, "got %d, expected %d\n", + cfi[index].dwFontSize.Y, win_height);
for (i = 0; i < num_fonts; i++) { @@ -2923,14 +2928,11 @@ static void test_GetConsoleFontInfo(HANDLE std_output)
memset(cfi, 0, memsize); ret = pGetConsoleFontInfo(std_output, TRUE, num_fonts, cfi); - todo_wine ok(ret || broken(!ret) /* win10 1809 */, "got %d, expected non-zero\n", ret); - if (ret) - { - todo_wine ok(cfi[index].dwFontSize.X == csbi.dwMaximumWindowSize.X, "got %d, expected %d\n", - cfi[index].dwFontSize.X, csbi.dwMaximumWindowSize.X); - todo_wine ok(cfi[index].dwFontSize.Y == csbi.dwMaximumWindowSize.Y, "got %d, expected %d\n", - cfi[index].dwFontSize.Y, csbi.dwMaximumWindowSize.Y); - } + todo_wine ok(ret, "got %d, expected non-zero\n", ret); + todo_wine ok(cfi[index].dwFontSize.X == csbi.dwMaximumWindowSize.X, "got %d, expected %d\n", + cfi[index].dwFontSize.X, csbi.dwMaximumWindowSize.X); + todo_wine ok(cfi[index].dwFontSize.Y == csbi.dwMaximumWindowSize.Y, "got %d, expected %d\n", + cfi[index].dwFontSize.Y, csbi.dwMaximumWindowSize.Y);
for (i = 0; i < num_fonts; i++) {