diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c index 4f1b2385ce0..1095279878c 100644 --- a/dlls/kernel32/tests/pipe.c +++ b/dlls/kernel32/tests/pipe.c @@ -1430,6 +1430,11 @@ static void test_CloseHandle(void) ok(!ret, "ReadFile unexpectedly succeeded\n"); ok(GetLastError() == ERROR_BROKEN_PIPE, "expected ERROR_BROKEN_PIPE, got %u\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = WriteFile(hfile, testdata, sizeof(testdata), &numbytes, NULL); + ok(!ret, "WriteFile unexpectedly succeeded\n"); + todo_wine ok(GetLastError() == ERROR_NO_DATA, "expected ERROR_NO_DATA, got %u\n", GetLastError()); + CloseHandle(hfile); hpipe = CreateNamedPipeA(PIPENAME, PIPE_ACCESS_DUPLEX, @@ -1459,6 +1464,11 @@ static void test_CloseHandle(void) ok(!ret, "ReadFile unexpectedly succeeded\n"); todo_wine ok(GetLastError() == ERROR_BROKEN_PIPE, "expected ERROR_BROKEN_PIPE, got %u\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = WriteFile(hfile, testdata, sizeof(testdata), &numbytes, NULL); + ok(!ret, "WriteFile unexpectedly succeeded\n"); + todo_wine ok(GetLastError() == ERROR_NO_DATA, "expected ERROR_NO_DATA, got %u\n", GetLastError()); + CloseHandle(hfile); /* repeat test with hpipe <-> hfile swapped */ @@ -1502,6 +1512,11 @@ static void test_CloseHandle(void) ok(!ret, "ReadFile unexpectedly succeeded\n"); ok(GetLastError() == ERROR_BROKEN_PIPE, "expected ERROR_BROKEN_PIPE, got %u\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = WriteFile(hpipe, testdata, sizeof(testdata), &numbytes, NULL); + ok(!ret, "WriteFile unexpectedly succeeded\n"); + todo_wine ok(GetLastError() == ERROR_NO_DATA, "expected ERROR_NO_DATA, got %u\n", GetLastError()); + CloseHandle(hpipe); hpipe = CreateNamedPipeA(PIPENAME, PIPE_ACCESS_DUPLEX, @@ -1531,6 +1546,11 @@ static void test_CloseHandle(void) ok(!ret, "ReadFile unexpectedly succeeded\n"); ok(GetLastError() == ERROR_BROKEN_PIPE, "expected ERROR_BROKEN_PIPE, got %u\n", GetLastError()); + SetLastError(0xdeadbeef); + ret = WriteFile(hpipe, testdata, sizeof(testdata), &numbytes, NULL); + ok(!ret, "WriteFile unexpectedly succeeded\n"); + todo_wine ok(GetLastError() == ERROR_NO_DATA, "expected ERROR_NO_DATA, got %u\n", GetLastError()); + CloseHandle(hpipe); }