[PATCH 1/2] kernel32/tests: Windows 10 dropped support for GetConsoleFontInfo().
Francois Gouget
fgouget at free.fr
Wed Nov 6 09:45:34 CST 2019
Windows 10 1507 still supports it but not 1607+.
Signed-off-by: Francois Gouget <fgouget at free.fr>
---
I don't know what's up with returning the low word of E_NOTIMPL rather
than ERROR_CALL_NOT_IMPLEMENTED. Seemed better to write it that way than
to use a magic 0x4001.
Note that the SetConsoleFont() tests need the same treatment so there
will still be 3 or so test failures on recent Windows 10. If this
approach is validated I'll send a similar patch for SetConsoleFont().
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 f85cd44ca73..97bea44e195 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++)
{
--
2.20.1
More information about the wine-devel
mailing list