forked from Mirrors/wine-wine
kernel32: Match the Windows 10 1709+ GetConsoleFontInfo().
That is return the same 'E_NOTIMPL' error code. Remove the todo_wine-s but keep the tests in case we want to implement the API for compatibility with older Windows versions. Signed-off-by: Francois Gouget <fgouget@free.fr> Signed-off-by: Alexandre Julliard <julliard@winehq.org>stable
parent
2f30f28b04
commit
31046449e6
|
@ -1711,7 +1711,7 @@ COORD WINAPI GetConsoleFontSize(HANDLE hConsole, DWORD index)
|
||||||
BOOL WINAPI GetConsoleFontInfo(HANDLE hConsole, BOOL maximize, DWORD numfonts, CONSOLE_FONT_INFO *info)
|
BOOL WINAPI GetConsoleFontInfo(HANDLE hConsole, BOOL maximize, DWORD numfonts, CONSOLE_FONT_INFO *info)
|
||||||
{
|
{
|
||||||
FIXME("(%p %d %u %p): stub!\n", hConsole, maximize, numfonts, info);
|
FIXME("(%p %d %u %p): stub!\n", hConsole, maximize, numfonts, info);
|
||||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
SetLastError(LOWORD(E_NOTIMPL) /* win10 1709+ */);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2847,7 +2847,7 @@ static void test_GetConsoleFontInfo(HANDLE std_output)
|
||||||
pGetNumberOfConsoleFonts = (void *)GetProcAddress(hmod, "GetNumberOfConsoleFonts");
|
pGetNumberOfConsoleFonts = (void *)GetProcAddress(hmod, "GetNumberOfConsoleFonts");
|
||||||
if (!pGetNumberOfConsoleFonts)
|
if (!pGetNumberOfConsoleFonts)
|
||||||
{
|
{
|
||||||
win_skip("GetNumberOfConsoleFonts is not available\n");
|
skip("GetNumberOfConsoleFonts is not available\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2873,17 +2873,17 @@ static void test_GetConsoleFontInfo(HANDLE std_output)
|
||||||
HeapFree(GetProcessHeap(), 0, cfi);
|
HeapFree(GetProcessHeap(), 0, cfi);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
|
ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
|
||||||
|
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = pGetConsoleFontInfo(GetStdHandle(STD_INPUT_HANDLE), FALSE, 0, cfi);
|
ret = pGetConsoleFontInfo(GetStdHandle(STD_INPUT_HANDLE), FALSE, 0, cfi);
|
||||||
ok(!ret, "got %d, expected zero\n", ret);
|
ok(!ret, "got %d, expected zero\n", ret);
|
||||||
todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
|
ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
|
||||||
|
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = pGetConsoleFontInfo(std_output, FALSE, 0, cfi);
|
ret = pGetConsoleFontInfo(std_output, FALSE, 0, cfi);
|
||||||
ok(!ret, "got %d, expected zero\n", ret);
|
ok(!ret, "got %d, expected zero\n", ret);
|
||||||
todo_wine ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError());
|
ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError());
|
||||||
|
|
||||||
GetConsoleScreenBufferInfo(std_output, &csbi);
|
GetConsoleScreenBufferInfo(std_output, &csbi);
|
||||||
win_width = csbi.srWindow.Right - csbi.srWindow.Left + 1;
|
win_width = csbi.srWindow.Right - csbi.srWindow.Left + 1;
|
||||||
|
@ -2895,11 +2895,11 @@ static void test_GetConsoleFontInfo(HANDLE std_output)
|
||||||
|
|
||||||
memset(cfi, 0, memsize);
|
memset(cfi, 0, memsize);
|
||||||
ret = pGetConsoleFontInfo(std_output, FALSE, num_fonts, cfi);
|
ret = pGetConsoleFontInfo(std_output, FALSE, num_fonts, cfi);
|
||||||
todo_wine ok(ret, "got %d, expected non-zero\n", ret);
|
ok(ret, "got %d, expected non-zero\n", ret);
|
||||||
todo_wine ok(cfi[index].dwFontSize.X == win_width, "got %d, expected %d\n",
|
ok(cfi[index].dwFontSize.X == win_width, "got %d, expected %d\n",
|
||||||
cfi[index].dwFontSize.X, win_width);
|
cfi[index].dwFontSize.X, win_width);
|
||||||
todo_wine ok(cfi[index].dwFontSize.Y == win_height, "got %d, expected %d\n",
|
ok(cfi[index].dwFontSize.Y == win_height, "got %d, expected %d\n",
|
||||||
cfi[index].dwFontSize.Y, win_height);
|
cfi[index].dwFontSize.Y, win_height);
|
||||||
|
|
||||||
for (i = 0; i < num_fonts; i++)
|
for (i = 0; i < num_fonts; i++)
|
||||||
{
|
{
|
||||||
|
@ -2907,32 +2907,32 @@ static void test_GetConsoleFontInfo(HANDLE std_output)
|
||||||
tmp_font = GetConsoleFontSize(std_output, cfi[i].nFont);
|
tmp_font = GetConsoleFontSize(std_output, cfi[i].nFont);
|
||||||
tmp_w = (double)orig_font.X / tmp_font.X * win_width;
|
tmp_w = (double)orig_font.X / tmp_font.X * win_width;
|
||||||
tmp_h = (double)orig_font.Y / tmp_font.Y * win_height;
|
tmp_h = (double)orig_font.Y / tmp_font.Y * win_height;
|
||||||
todo_wine ok(cfi[i].dwFontSize.X == tmp_w, "got %d, expected %d\n", cfi[i].dwFontSize.X, tmp_w);
|
ok(cfi[i].dwFontSize.X == tmp_w, "got %d, expected %d\n", cfi[i].dwFontSize.X, tmp_w);
|
||||||
todo_wine ok(cfi[i].dwFontSize.Y == tmp_h, "got %d, expected %d\n", cfi[i].dwFontSize.Y, tmp_h);
|
ok(cfi[i].dwFontSize.Y == tmp_h, "got %d, expected %d\n", cfi[i].dwFontSize.Y, tmp_h);
|
||||||
}
|
}
|
||||||
|
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = pGetConsoleFontInfo(NULL, TRUE, 0, cfi);
|
ret = pGetConsoleFontInfo(NULL, TRUE, 0, cfi);
|
||||||
ok(!ret, "got %d, expected zero\n", ret);
|
ok(!ret, "got %d, expected zero\n", ret);
|
||||||
todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
|
ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
|
||||||
|
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = pGetConsoleFontInfo(GetStdHandle(STD_INPUT_HANDLE), TRUE, 0, cfi);
|
ret = pGetConsoleFontInfo(GetStdHandle(STD_INPUT_HANDLE), TRUE, 0, cfi);
|
||||||
ok(!ret, "got %d, expected zero\n", ret);
|
ok(!ret, "got %d, expected zero\n", ret);
|
||||||
todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
|
ok(GetLastError() == ERROR_INVALID_HANDLE, "got %u, expected 6\n", GetLastError());
|
||||||
|
|
||||||
SetLastError(0xdeadbeef);
|
SetLastError(0xdeadbeef);
|
||||||
ret = pGetConsoleFontInfo(std_output, TRUE, 0, cfi);
|
ret = pGetConsoleFontInfo(std_output, TRUE, 0, cfi);
|
||||||
ok(!ret, "got %d, expected zero\n", ret);
|
ok(!ret, "got %d, expected zero\n", ret);
|
||||||
todo_wine ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError());
|
ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError());
|
||||||
|
|
||||||
memset(cfi, 0, memsize);
|
memset(cfi, 0, memsize);
|
||||||
ret = pGetConsoleFontInfo(std_output, TRUE, num_fonts, cfi);
|
ret = pGetConsoleFontInfo(std_output, TRUE, num_fonts, cfi);
|
||||||
todo_wine ok(ret, "got %d, expected non-zero\n", ret);
|
ok(ret, "got %d, expected non-zero\n", ret);
|
||||||
todo_wine ok(cfi[index].dwFontSize.X == csbi.dwMaximumWindowSize.X, "got %d, expected %d\n",
|
ok(cfi[index].dwFontSize.X == csbi.dwMaximumWindowSize.X, "got %d, expected %d\n",
|
||||||
cfi[index].dwFontSize.X, csbi.dwMaximumWindowSize.X);
|
cfi[index].dwFontSize.X, csbi.dwMaximumWindowSize.X);
|
||||||
todo_wine ok(cfi[index].dwFontSize.Y == csbi.dwMaximumWindowSize.Y, "got %d, expected %d\n",
|
ok(cfi[index].dwFontSize.Y == csbi.dwMaximumWindowSize.Y, "got %d, expected %d\n",
|
||||||
cfi[index].dwFontSize.Y, csbi.dwMaximumWindowSize.Y);
|
cfi[index].dwFontSize.Y, csbi.dwMaximumWindowSize.Y);
|
||||||
|
|
||||||
for (i = 0; i < num_fonts; i++)
|
for (i = 0; i < num_fonts; i++)
|
||||||
{
|
{
|
||||||
|
@ -2940,8 +2940,8 @@ static void test_GetConsoleFontInfo(HANDLE std_output)
|
||||||
tmp_font = GetConsoleFontSize(std_output, cfi[i].nFont);
|
tmp_font = GetConsoleFontSize(std_output, cfi[i].nFont);
|
||||||
tmp_w = (double)orig_font.X / tmp_font.X * csbi.dwMaximumWindowSize.X;
|
tmp_w = (double)orig_font.X / tmp_font.X * csbi.dwMaximumWindowSize.X;
|
||||||
tmp_h = (double)orig_font.Y / tmp_font.Y * csbi.dwMaximumWindowSize.Y;
|
tmp_h = (double)orig_font.Y / tmp_font.Y * csbi.dwMaximumWindowSize.Y;
|
||||||
todo_wine ok(cfi[i].dwFontSize.X == tmp_w, "got %d, expected %d\n", cfi[i].dwFontSize.X, tmp_w);
|
ok(cfi[i].dwFontSize.X == tmp_w, "got %d, expected %d\n", cfi[i].dwFontSize.X, tmp_w);
|
||||||
todo_wine ok(cfi[i].dwFontSize.Y == tmp_h, "got %d, expected %d\n", cfi[i].dwFontSize.Y, tmp_h);
|
ok(cfi[i].dwFontSize.Y == tmp_h, "got %d, expected %d\n", cfi[i].dwFontSize.Y, tmp_h);
|
||||||
}
|
}
|
||||||
|
|
||||||
HeapFree(GetProcessHeap(), 0, cfi);
|
HeapFree(GetProcessHeap(), 0, cfi);
|
||||||
|
|
Loading…
Reference in New Issue