Commit 3ba2b589 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

kernel32/tests: Improved pipe CloseHandle tests.

Current tests suggest that SetNamedPipeHandleState between ReadFile calls makes a difference (and it doesn't). Signed-off-by: 's avatarJacek Caban <jacek@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent a8956794
......@@ -1473,6 +1473,11 @@ static void test_CloseHandle(void)
todo_wine ok(ret, "ReadFile failed with %u\n", GetLastError());
ok(numbytes == 0, "expected 0, got %u\n", numbytes);
SetLastError(0xdeadbeef);
ret = ReadFile(hfile, buffer, 0, &numbytes, NULL);
ok(!ret, "ReadFile unexpectedly succeeded\n");
todo_wine ok(GetLastError() == ERROR_BROKEN_PIPE, "expected ERROR_BROKEN_PIPE, got %u\n", GetLastError());
ret = GetNamedPipeHandleStateA(hfile, &state, NULL, NULL, NULL, NULL, 0);
ok(ret, "GetNamedPipeHandleState failed with %u\n", GetLastError());
state = PIPE_READMODE_MESSAGE | PIPE_WAIT;
......@@ -1567,6 +1572,11 @@ static void test_CloseHandle(void)
todo_wine ok(ret, "ReadFile failed with %u\n", GetLastError());
ok(numbytes == 0, "expected 0, got %u\n", numbytes);
SetLastError(0xdeadbeef);
ret = ReadFile(hpipe, buffer, 0, &numbytes, NULL);
ok(!ret, "ReadFile unexpectedly succeeded\n");
ok(GetLastError() == ERROR_BROKEN_PIPE, "expected ERROR_BROKEN_PIPE, got %u\n", GetLastError());
ret = GetNamedPipeHandleStateA(hpipe, &state, NULL, NULL, NULL, NULL, 0);
ok(ret, "GetNamedPipeHandleState failed with %u\n", GetLastError());
state = PIPE_READMODE_MESSAGE | PIPE_WAIT;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment