From adc60c779f785df9f4c46537321336904ddf26a9 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Thu, 10 Apr 2014 17:41:39 +0900 Subject: [PATCH] taskschd/tests: Add a test for registering a task with NULL name in a not root folder. --- dlls/taskschd/tests/scheduler.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dlls/taskschd/tests/scheduler.c b/dlls/taskschd/tests/scheduler.c index 17501adef70..b3fe9ead651 100644 --- a/dlls/taskschd/tests/scheduler.c +++ b/dlls/taskschd/tests/scheduler.c @@ -931,8 +931,8 @@ todo_wine hr = ITaskFolder_RegisterTask(root, NULL, xmlW, TASK_CREATE, v_null, v_null, TASK_LOGON_NONE, v_null, &task1); todo_wine ok(hr == S_OK, "RegisterTask error %#x\n", hr); - /* FIXME: Remove once implemented */ - if (hr != S_OK) goto failed; +if (hr == S_OK) +{ hr = IRegisteredTask_get_Name(task1, &bstr); ok(hr == S_OK, "get_Name error %#x\n", hr); hr = IIDFromString(bstr, &iid); @@ -942,8 +942,12 @@ todo_wine hr = ITaskFolder_DeleteTask(root, bstr, 0); ok(hr == S_OK, "DeleteTask error %#x\n", hr); +} + + hr = ITaskFolder_RegisterTask(folder, NULL, xmlW, TASK_CREATE, v_null, v_null, TASK_LOGON_NONE, v_null, &task1); +todo_wine + ok(hr == E_INVALIDARG, "expected E_INVALIDARG, got %#x\n", hr); -failed: ITaskFolder_Release(folder); hr = ITaskFolder_DeleteFolder(root, Wine, 0);