[PATCH 3/4] kernel32/tests: Add tests for GetCurrentConsoleFont

Sebastian Lackner sebastian at fds-team.de
Tue Oct 20 19:54:55 CDT 2015


On 21.10.2015 02:43, Hugh McMaster wrote:
> +    if (osvi.dwMajorVersion >= 6) /* Windows Vista or higher */
> +    {
> +        COORD c;
> +        c = GetConsoleFontSize(std_output, cfi.nFont);
> +        todo_wine ok(cfi.dwFontSize.X == c.X, "got %d, expected %d\n", cfi.dwFontSize.X, c.X);
> +        todo_wine ok(cfi.dwFontSize.Y == c.Y, "got %d, expected %d\n", cfi.dwFontSize.Y, c.Y);
> +    }
> +    else
> +    {
> +        CONSOLE_SCREEN_BUFFER_INFO csbi;
> +        short int width, height;
> +        GetConsoleScreenBufferInfo(std_output, &csbi);
> +        width = csbi.srWindow.Right - csbi.srWindow.Left + 1;
> +        height = csbi.srWindow.Bottom - csbi.srWindow.Top + 1;
> +        ok(cfi.dwFontSize.X == width, "got %d, expected %d\n", cfi.dwFontSize.X, width);
> +        ok(cfi.dwFontSize.Y == height, "got %d, expected %d\n", cfi.dwFontSize.Y, height);
> +    }

I haven't reviewed the whole patch, but wanted to point that we usually do not test or
implement Windows version specific behavior, unless an application depends on it. Often
only one of both is implemented, and the other version is marked as broken.

If you decide to implement the pre-Vista behavior (which would make sense, because Wine
still uses WinXP as default version), it seems like no wineserver changes are required
at all (at least as long as font.index is always 0).




More information about the wine-devel mailing list