kernel32/tests: Add tests for adding a terminated process to a job object.

This commit is contained in:
Sebastian Lackner 2015-02-28 06:34:24 +01:00 committed by Alexandre Julliard
parent 6cd34c9002
commit ddd3d1689c

View File

@ -2245,6 +2245,23 @@ static void test_TerminateJobObject(void)
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
/* Test adding an already terminated process to a job object */
create_process("exit", &pi);
dwret = WaitForSingleObject(pi.hProcess, 1000);
ok(dwret == WAIT_OBJECT_0, "WaitForSingleObject returned %u\n", dwret);
SetLastError(0xdeadbeef);
ret = pAssignProcessToJobObject(job, pi.hProcess);
todo_wine
ok(!ret, "AssignProcessToJobObject unexpectedly succeeded\n");
todo_wine
expect_eq_d(ERROR_ACCESS_DENIED, GetLastError());
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
CloseHandle(job);
}