kernel32/tests: Use a real console handle in the VerifyConsoleIoHandle test.

This commit is contained in:
Alexandre Julliard 2010-09-29 11:57:42 +02:00
parent 6457d14b71
commit 5db7d5957a
1 changed files with 2 additions and 4 deletions

View File

@ -1085,11 +1085,10 @@ static void test_OpenConsoleW(void)
CloseHandle(ret);
}
static void test_VerifyConsoleIoHandle(void)
static void test_VerifyConsoleIoHandle( HANDLE handle )
{
BOOL ret;
DWORD error;
HANDLE handle;
if (!pVerifyConsoleIoHandle)
{
@ -1125,7 +1124,6 @@ static void test_VerifyConsoleIoHandle(void)
ok(!ret, "expected VerifyConsoleIoHandle to fail\n");
ok(error == 0xdeadbeef, "wrong GetLastError() %d\n", error);
handle = GetStdHandle(STD_INPUT_HANDLE);
/* valid handle */
SetLastError(0xdeadbeef);
ret = pVerifyConsoleIoHandle(handle);
@ -1221,6 +1219,6 @@ START_TEST(console)
test_GetConsoleProcessList();
test_OpenConsoleW();
test_VerifyConsoleIoHandle();
test_VerifyConsoleIoHandle(hConOut);
test_GetSetStdHandle();
}