- Sync wine tests with Wine 1.1.21

svn path=/trunk/; revision=40949
This commit is contained in:
Dmitry Chapyshev 2009-05-17 07:05:22 +00:00
parent 03ac7b5446
commit 471e010d18
178 changed files with 22374 additions and 5609 deletions

View file

@ -162,7 +162,7 @@ static void testCursorInfo(HANDLE hCon)
if (info.dwSize == 12)
{
skip("NULL CONSOLE_CURSOR_INFO will crash on win9x\n");
win_skip("NULL CONSOLE_CURSOR_INFO will crash on win9x\n");
return;
}
@ -173,7 +173,46 @@ static void testCursorInfo(HANDLE hCon)
ERROR_INVALID_ACCESS, GetLastError());
}
static void testWriteSimple(HANDLE hCon, COORD sbSize)
static void testEmptyWrite(HANDLE hCon)
{
COORD c;
DWORD len;
const char* mytest = "";
c.X = c.Y = 0;
ok(SetConsoleCursorPosition(hCon, c) != 0, "Cursor in upper-left\n");
len = -1;
ok(WriteConsole(hCon, NULL, 0, &len, NULL) != 0 && len == 0, "WriteConsole\n");
okCURSOR(hCon, c);
/* Passing a NULL lpBuffer with sufficiently large non-zero length succeeds
* on native Windows and result in memory-like contents being written to
* the console. Calling WriteConsoleW like this will crash on Wine. */
if (0)
{
len = -1;
ok(!WriteConsole(hCon, NULL, 16, &len, NULL) && len == -1, "WriteConsole\n");
okCURSOR(hCon, c);
/* Cursor advances for this call. */
len = -1;
ok(WriteConsole(hCon, NULL, 128, &len, NULL) != 0 && len == 128, "WriteConsole\n");
}
len = -1;
ok(WriteConsole(hCon, mytest, 0, &len, NULL) != 0 && len == 0, "WriteConsole\n");
okCURSOR(hCon, c);
/* WriteConsole does not halt on a null terminator and is happy to write
* memory contents beyond the actual size of the buffer. */
len = -1;
ok(WriteConsole(hCon, mytest, 16, &len, NULL) != 0 && len == 16, "WriteConsole\n");
c.X += 16;
okCURSOR(hCon, c);
}
static void testWriteSimple(HANDLE hCon)
{
COORD c;
DWORD len;
@ -407,7 +446,9 @@ static void testWrite(HANDLE hCon, COORD sbSize)
/* FIXME: should in fact insure that the sb is at least 10 character wide */
ok(SetConsoleTextAttribute(hCon, TEST_ATTRIB), "Setting default text color\n");
resetContent(hCon, sbSize, FALSE);
testWriteSimple(hCon, sbSize);
testEmptyWrite(hCon);
resetContent(hCon, sbSize, FALSE);
testWriteSimple(hCon);
resetContent(hCon, sbSize, FALSE);
testWriteNotWrappedNotProcessed(hCon, sbSize);
resetContent(hCon, sbSize, FALSE);
@ -665,7 +706,7 @@ static void testScreenBuffer(HANDLE hConOut)
ret = SetConsoleOutputCP(866);
if (!ret && GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)
{
skip("SetConsoleOutputCP is not implemented\n");
win_skip("SetConsoleOutputCP is not implemented\n");
return;
}
ok(ret, "Cannot set output codepage to 866\n");
@ -901,7 +942,8 @@ START_TEST(console)
ok(hConIn != INVALID_HANDLE_VALUE, "Opening ConIn\n");
ok(hConOut != INVALID_HANDLE_VALUE, "Opening ConOut\n");
ok(ret = GetConsoleScreenBufferInfo(hConOut, &sbi), "Getting sb info\n");
ret = GetConsoleScreenBufferInfo(hConOut, &sbi);
ok(ret, "Getting sb info\n");
if (!ret) return;
/* Non interactive tests */
@ -921,7 +963,7 @@ START_TEST(console)
if (!pGetConsoleInputExeNameA || !pSetConsoleInputExeNameA)
{
skip("GetConsoleInputExeNameA and/or SetConsoleInputExeNameA is not available\n");
win_skip("GetConsoleInputExeNameA and/or SetConsoleInputExeNameA is not available\n");
return;
}
else