mirror of
https://github.com/reactos/wine.git
synced 2025-02-27 08:15:36 +00:00
kernel32/tests: Add more tests for WriteConsole.
This commit is contained in:
parent
62901e6ea0
commit
e4692b3f66
@ -780,6 +780,28 @@ static void testScreenBuffer(HANDLE hConOut)
|
||||
"GetLastError: expecting %u got %u\n",
|
||||
ERROR_INVALID_HANDLE, GetLastError());
|
||||
|
||||
/* trying to write non-console handle */
|
||||
SetLastError(0xdeadbeef);
|
||||
ok(!WriteConsoleA(hFileOutRW, test_str1, lstrlenA(test_str1), &len, NULL),
|
||||
"Shouldn't succeed\n");
|
||||
ok(GetLastError() == ERROR_INVALID_HANDLE,
|
||||
"GetLastError: expecting %u got %u\n",
|
||||
ERROR_INVALID_HANDLE, GetLastError());
|
||||
|
||||
SetLastError(0xdeadbeef);
|
||||
ok(!WriteConsoleA(hFileOutRO, test_str1, lstrlenA(test_str1), &len, NULL),
|
||||
"Shouldn't succeed\n");
|
||||
ok(GetLastError() == ERROR_INVALID_HANDLE,
|
||||
"GetLastError: expecting %u got %u\n",
|
||||
ERROR_INVALID_HANDLE, GetLastError());
|
||||
|
||||
SetLastError(0xdeadbeef);
|
||||
ok(!WriteConsoleA(hFileOutWT, test_str1, lstrlenA(test_str1), &len, NULL),
|
||||
"Shouldn't succeed\n");
|
||||
todo_wine ok(GetLastError() == ERROR_INVALID_HANDLE,
|
||||
"GetLastError: expecting %u got %u\n",
|
||||
ERROR_INVALID_HANDLE, GetLastError());
|
||||
|
||||
CloseHandle(hFileOutRW);
|
||||
CloseHandle(hFileOutRO);
|
||||
CloseHandle(hFileOutWT);
|
||||
|
Loading…
x
Reference in New Issue
Block a user