Commit 4d3eb56e authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

kernel32/tests: Fix the ScrollConsoleScreenBuffer() tests on Windows 10 1909.

On Windows 10 1909 ScrollConsoleScreenBufferA() returns an error if the destination is not within the clip rectangle but still modifies the console buffer as expected! So mark this behavior as very_broken(). Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54871
parent c441ad6a
......@@ -683,6 +683,20 @@ static void testScroll(HANDLE hCon, COORD sbSize)
"Expected ERROR_NOT_ENOUGH_MEMORY, got %lu\n", GetLastError());
}
/* no clipping, src & dst rect do overlap */
scroll.Left = 0;
scroll.Right = W - 1;
scroll.Top = 0;
scroll.Bottom = H - 1;
dst.X = W / 2 - 3;
dst.Y = H / 2 - 3;
ci.Char.UnicodeChar = '#';
ci.Attributes = TEST_ATTRIB;
ret = ScrollConsoleScreenBufferA(hCon, &scroll, NULL, dst, &ci);
ok(ret, "ScrollConsoleScreenBufferA failed: %lu\n", GetLastError());
/* no win10 1909 error here, only check the result of the clipped case */
/* clipping, src & dst rect do overlap */
resetContent(hCon, sbSize, TRUE);
......@@ -700,8 +714,14 @@ static void testScroll(HANDLE hCon, COORD sbSize)
clip.Top = H / 2;
clip.Bottom = min(H + H / 2, sbSize.Y - 1);
/* Windows 10 1909 fails if the destination is not in the clip rect
* but the result is still ok!
*/
SetLastError(0xdeadbeef);
ret = ScrollConsoleScreenBufferA(hCon, &scroll, &clip, dst, &ci);
ok(ret, "ScrollConsoleScreenBufferA failed: %lu\n", GetLastError());
ok((ret && GetLastError() == 0xdeadbeef) ||
broken(!ret && GetLastError() == ERROR_INVALID_PARAMETER),
"ScrollConsoleScreenBufferA failed: %lu\n", GetLastError());
for (c.Y = 0; c.Y < sbSize.Y; c.Y++)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment