Jacek Caban : kernel32/tests: Skip more FreeConsole tests on win7.

Alexandre Julliard julliard at winehq.org
Tue Sep 1 15:43:31 CDT 2020


Module: wine
Branch: master
Commit: 7d3503d83ece320ed023297e12d766e487383462
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=7d3503d83ece320ed023297e12d766e487383462

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Tue Sep  1 15:35:33 2020 +0200

kernel32/tests: Skip more FreeConsole tests on win7.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernel32/tests/console.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/dlls/kernel32/tests/console.c b/dlls/kernel32/tests/console.c
index a8c07dcae7..3d53bfe260 100644
--- a/dlls/kernel32/tests/console.c
+++ b/dlls/kernel32/tests/console.c
@@ -3659,6 +3659,8 @@ static void test_FreeConsole(void)
     ok(title[0] == 0xc0c0, "title byffer changed\n");
     ok(GetLastError() == ERROR_INVALID_HANDLE, "last error %u\n", GetLastError());
 
+    if (skip_nt) return;
+
     SetLastError(0xdeadbeef);
     ret = SetConsoleTitleW( L"test" );
     ok(!ret && GetLastError() == ERROR_INVALID_HANDLE, "SetConsoleTitleW returned %x(%u)\n", ret, GetLastError());
@@ -3668,15 +3670,12 @@ static void test_FreeConsole(void)
     ok(!hwnd, "hwnd = %p\n", hwnd);
     ok(GetLastError() == ERROR_INVALID_HANDLE, "last error %u\n", GetLastError());
 
-    if (!skip_nt)
-    {
-        SetStdHandle( STD_INPUT_HANDLE, (HANDLE)0xdeadbeef );
-        handle = GetConsoleInputWaitHandle();
-        ok(handle == (HANDLE)0xdeadbeef, "GetConsoleInputWaitHandle returned %p\n", handle);
-        SetStdHandle( STD_INPUT_HANDLE, NULL );
-        handle = GetConsoleInputWaitHandle();
-        ok(!handle, "GetConsoleInputWaitHandle returned %p\n", handle);
-    }
+    SetStdHandle( STD_INPUT_HANDLE, (HANDLE)0xdeadbeef );
+    handle = GetConsoleInputWaitHandle();
+    ok(handle == (HANDLE)0xdeadbeef, "GetConsoleInputWaitHandle returned %p\n", handle);
+    SetStdHandle( STD_INPUT_HANDLE, NULL );
+    handle = GetConsoleInputWaitHandle();
+    ok(!handle, "GetConsoleInputWaitHandle returned %p\n", handle);
 }
 
 static void test_SetConsoleScreenBufferInfoEx(HANDLE std_output)




More information about the wine-cvs mailing list