Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
2c925f23
Commit
2c925f23
authored
Mar 06, 2018
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Mar 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskschd/tests: Add more tests for actions.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
18847145
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
1 deletion
+54
-1
scheduler.c
dlls/taskschd/tests/scheduler.c
+54
-1
No files found.
dlls/taskschd/tests/scheduler.c
View file @
2c925f23
...
...
@@ -1304,6 +1304,8 @@ static void test_daily_trigger(ITrigger *trigger)
static
void
create_action
(
ITaskDefinition
*
taskdef
)
{
static
WCHAR
task1_exe
[]
=
{
't'
,
'a'
,
's'
,
'k'
,
'1'
,
'.'
,
'e'
,
'x'
,
'e'
,
0
};
static
WCHAR
workdir
[]
=
{
'w'
,
'o'
,
'r'
,
'k'
,
'd'
,
'i'
,
'r'
,
0
};
static
WCHAR
args
[]
=
{
'a'
,
'r'
,
'g'
,
'u'
,
'm'
,
'e'
,
'n'
,
's'
,
0
};
HRESULT
hr
;
IActionCollection
*
actions
;
IAction
*
action
;
...
...
@@ -1311,6 +1313,9 @@ static void create_action(ITaskDefinition *taskdef)
TASK_ACTION_TYPE
type
;
BSTR
path
;
hr
=
ITaskDefinition_get_Actions
(
taskdef
,
NULL
);
ok
(
hr
==
E_POINTER
,
"got %#x
\n
"
,
hr
);
hr
=
ITaskDefinition_get_Actions
(
taskdef
,
&
actions
);
ok
(
hr
==
S_OK
,
"get_Actions error %#x
\n
"
,
hr
);
...
...
@@ -1325,11 +1330,17 @@ static void create_action(ITaskDefinition *taskdef)
ok
(
hr
==
S_OK
,
"get_Type error %#x
\n
"
,
hr
);
ok
(
type
==
TASK_ACTION_EXEC
,
"got %u
\n
"
,
type
);
hr
=
IExecAction_get_Path
(
exec_action
,
NULL
);
ok
(
hr
==
E_POINTER
,
"got %#x
\n
"
,
hr
);
path
=
(
BSTR
)
0xdeadbeef
;
hr
=
IExecAction_get_Path
(
exec_action
,
&
path
);
ok
(
hr
==
S_OK
,
"get_Path error %#x
\n
"
,
hr
);
ok
(
path
==
NULL
,
"path not set
\n
"
);
hr
=
IExecAction_put_Path
(
exec_action
,
NULL
);
ok
(
hr
==
S_OK
,
"put_Path error %#x
\n
"
,
hr
);
hr
=
IExecAction_put_Path
(
exec_action
,
task1_exe
);
ok
(
hr
==
S_OK
,
"put_Path error %#x
\n
"
,
hr
);
...
...
@@ -1337,7 +1348,49 @@ static void create_action(ITaskDefinition *taskdef)
hr
=
IExecAction_get_Path
(
exec_action
,
&
path
);
ok
(
hr
==
S_OK
,
"get_Path error %#x
\n
"
,
hr
);
ok
(
path
!=
NULL
,
"path not set
\n
"
);
ok
(
!
lstrcmpW
(
path
,
task1_exe
),
"wrong path
\n
"
);
ok
(
!
lstrcmpW
(
path
,
task1_exe
),
"got %s
\n
"
,
wine_dbgstr_w
(
path
));
SysFreeString
(
path
);
hr
=
IExecAction_get_WorkingDirectory
(
exec_action
,
NULL
);
ok
(
hr
==
E_POINTER
,
"got %#x
\n
"
,
hr
);
path
=
(
BSTR
)
0xdeadbeef
;
hr
=
IExecAction_get_WorkingDirectory
(
exec_action
,
&
path
);
ok
(
hr
==
S_OK
,
"get_WorkingDirectory error %#x
\n
"
,
hr
);
ok
(
path
==
NULL
,
"workdir not set
\n
"
);
hr
=
IExecAction_put_WorkingDirectory
(
exec_action
,
NULL
);
ok
(
hr
==
S_OK
,
"put_WorkingDirectory error %#x
\n
"
,
hr
);
hr
=
IExecAction_put_WorkingDirectory
(
exec_action
,
workdir
);
ok
(
hr
==
S_OK
,
"put_WorkingDirectory error %#x
\n
"
,
hr
);
path
=
NULL
;
hr
=
IExecAction_get_WorkingDirectory
(
exec_action
,
&
path
);
ok
(
hr
==
S_OK
,
"get_WorkingDirectory error %#x
\n
"
,
hr
);
ok
(
path
!=
NULL
,
"workdir not set
\n
"
);
ok
(
!
lstrcmpW
(
path
,
workdir
),
"got %s
\n
"
,
wine_dbgstr_w
(
path
));
SysFreeString
(
path
);
hr
=
IExecAction_get_Arguments
(
exec_action
,
NULL
);
ok
(
hr
==
E_POINTER
,
"got %#x
\n
"
,
hr
);
path
=
(
BSTR
)
0xdeadbeef
;
hr
=
IExecAction_get_Arguments
(
exec_action
,
&
path
);
ok
(
hr
==
S_OK
,
"get_Arguments error %#x
\n
"
,
hr
);
ok
(
path
==
NULL
,
"args not set
\n
"
);
hr
=
IExecAction_put_Arguments
(
exec_action
,
NULL
);
ok
(
hr
==
S_OK
,
"put_Arguments error %#x
\n
"
,
hr
);
hr
=
IExecAction_put_Arguments
(
exec_action
,
args
);
ok
(
hr
==
S_OK
,
"put_WorkingDirectory error %#x
\n
"
,
hr
);
path
=
NULL
;
hr
=
IExecAction_get_Arguments
(
exec_action
,
&
path
);
ok
(
hr
==
S_OK
,
"get_Arguments error %#x
\n
"
,
hr
);
ok
(
path
!=
NULL
,
"args not set
\n
"
);
ok
(
!
lstrcmpW
(
path
,
args
),
"got %s
\n
"
,
wine_dbgstr_w
(
path
));
SysFreeString
(
path
);
IExecAction_Release
(
exec_action
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment