From cbf4c5c650448ffc9edd04bdeea1b18b80431ead Mon Sep 17 00:00:00 2001 From: Ferenc Wagner Date: Fri, 8 Oct 2004 23:35:47 +0000 Subject: [PATCH] Unconditionally open a fresh console for the tests. --- dlls/kernel/tests/console.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/dlls/kernel/tests/console.c b/dlls/kernel/tests/console.c index a1455dbb1ce..069796b6dcd 100644 --- a/dlls/kernel/tests/console.c +++ b/dlls/kernel/tests/console.c @@ -565,17 +565,12 @@ START_TEST(console) * the curses backend */ + /* first, we detach and open a fresh console to play with */ + FreeConsole(); + AllocConsole(); hConIn = CreateFileA("CONIN$", GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); hConOut = CreateFileA("CONOUT$", GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); - /* first, we need to be sure we're attached to a console */ - if (hConIn == INVALID_HANDLE_VALUE || hConOut == INVALID_HANDLE_VALUE) - { - /* we're not attached to a console, let's do it */ - AllocConsole(); - hConIn = CreateFileA("CONIN$", GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); - hConOut = CreateFileA("CONOUT$", GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, 0); - } /* now verify everything's ok */ ok(hConIn != INVALID_HANDLE_VALUE, "Opening ConIn\n"); ok(hConOut != INVALID_HANDLE_VALUE, "Opening ConOut\n");