kernel32/tests: Don't run tests on win9x if we are out of memory.

This commit is contained in:
Paul Vriens 2008-05-02 12:05:02 +02:00 committed by Alexandre Julliard
parent 587eda5aa9
commit 0a4eebd744
1 changed files with 21 additions and 11 deletions

View File

@ -380,6 +380,7 @@ static void testScroll(HANDLE hCon, COORD sbSize)
SMALL_RECT scroll, clip;
COORD dst, c, tc;
CHAR_INFO ci;
BOOL ret;
#define W 11
#define H 7
@ -473,8 +474,10 @@ static void testScroll(HANDLE hCon, COORD sbSize)
clip.Top = H / 2;
clip.Bottom = min(H + H / 2, sbSize.Y - 1);
ok(ScrollConsoleScreenBuffer(hCon, &scroll, &clip, dst, &ci), "Scrolling SB\n");
SetLastError(0xdeadbeef);
ret = ScrollConsoleScreenBuffer(hCon, &scroll, &clip, dst, &ci);
if (ret)
{
for (c.Y = 0; c.Y < sbSize.Y; c.Y++)
{
for (c.X = 0; c.X < sbSize.X; c.X++)
@ -490,6 +493,13 @@ static void testScroll(HANDLE hCon, COORD sbSize)
else okCHAR(hCon, c, CONTENT(c), DEFAULT_ATTRIB);
}
}
}
else
{
/* Win9x will fail, Only accept ERROR_NOT_ENOUGH_MEMORY */
ok(GetLastError() == ERROR_NOT_ENOUGH_MEMORY,
"Expected ERROR_NOT_ENOUGH_MEMORY, got %u\n", GetLastError());
}
/* clipping, src & dst rect do overlap */
resetContent(hCon, sbSize, TRUE);