[PATCH 4/5] kernel32/tests: Refresh the console to clear the console font table

Hugh McMaster hugh.mcmaster at outlook.com
Tue Jan 5 01:59:34 CST 2016


The testScreenBuffer function unintentionally causes the console
font table to increase from 14 entries to about 40. This patch restores the font table.

Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
---
 dlls/kernel32/tests/console.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/dlls/kernel32/tests/console.c b/dlls/kernel32/tests/console.c
index 240d9d8..3ba1da5 100644
--- a/dlls/kernel32/tests/console.c
+++ b/dlls/kernel32/tests/console.c
@@ -2787,6 +2787,17 @@ START_TEST(console)
     testScroll(hConOut, sbi.dwSize);
     /* will test sb creation / modification / codepage handling */
     testScreenBuffer(hConOut);
+
+    /* clear duplicated console font table */
+    CloseHandle(hConIn);
+    CloseHandle(hConOut);
+    FreeConsole();
+    ok(AllocConsole(), "Couldn't alloc console\n");
+    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);
+    ok(hConIn != INVALID_HANDLE_VALUE, "Opening ConIn\n");
+    ok(hConOut != INVALID_HANDLE_VALUE, "Opening ConOut\n");
+
     testCtrlHandler();
     /* still to be done: access rights & access on objects */
 
-- 
1.9.1




More information about the wine-patches mailing list