Hugh McMaster : kernel32/tests: Refresh the console to clear the console font table.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Jan 5 12:18:33 CST 2016


Module: wine
Branch: master
Commit: b36cc985a4af36f51c3080849f8e3a5f63c15f95
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b36cc985a4af36f51c3080849f8e3a5f63c15f95

Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date:   Tue Jan  5 18:59:34 2016 +1100

kernel32/tests: Refresh the console to clear the console font table.

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

Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
Signed-off-by: Sebastian Lackner <sebastian at fds-team.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 */
 




More information about the wine-cvs mailing list