mstask/tests: Skip ITaskScheduler::SetTargetComputer tests if the user doesn't have admin rights.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Hans Leidekker 2016-12-19 11:38:50 +01:00 committed by Alexandre Julliard
parent ea7c86a715
commit 64c1353925
1 changed files with 6 additions and 0 deletions

View File

@ -184,6 +184,11 @@ static void test_SetTargetComputer(void)
/* the two backslashes are optional */
hres = ITaskScheduler_SetTargetComputer(test_task_scheduler, oldname + 2);
if (hres == E_ACCESSDENIED)
{
skip("SetTargetComputer failed with E_ACCESSDENIED (needs admin rights)\n");
goto done;
}
ok(hres == S_OK, "got 0x%x (expected S_OK)\n", hres);
/* the case is ignored */
@ -198,6 +203,7 @@ static void test_SetTargetComputer(void)
hres = ITaskScheduler_SetTargetComputer(test_task_scheduler, oldname);
ok(hres == S_OK, "got 0x%x (expected S_OK)\n", hres);
done:
CoTaskMemFree(oldname);
ITaskScheduler_Release(test_task_scheduler);
return;