Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
7341996f
Commit
7341996f
authored
Jan 16, 2014
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jan 16, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
taskschd/tests: Add more task folder tests.
parent
006aadd3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
81 additions
and
2 deletions
+81
-2
scheduler.c
dlls/taskschd/tests/scheduler.c
+81
-2
No files found.
dlls/taskschd/tests/scheduler.c
View file @
7341996f
...
...
@@ -118,19 +118,21 @@ todo_wine
static
void
test_GetFolder
(
void
)
{
static
WCHAR
dot
[]
=
{
'.'
,
0
};
static
WCHAR
empty
[]
=
{
0
};
static
WCHAR
slash
[]
=
{
'/'
,
0
};
static
WCHAR
bslash
[]
=
{
'\\'
,
0
};
static
WCHAR
Wine
[]
=
{
'\\'
,
'W'
,
'i'
,
'n'
,
'e'
,
0
};
static
WCHAR
Wine_Folder1
[]
=
{
'\\'
,
'W'
,
'i'
,
'n'
,
'e'
,
'\\'
,
'F'
,
'o'
,
'l'
,
'd'
,
'e'
,
'r'
,
'1'
,
0
};
static
WCHAR
Wine_Folder1_
[]
=
{
'\\'
,
'W'
,
'i'
,
'n'
,
'e'
,
'\\'
,
'F'
,
'o'
,
'l'
,
'd'
,
'e'
,
'r'
,
'1'
,
'\\'
,
0
};
static
WCHAR
Wine_Folder1_Folder2
[]
=
{
'\\'
,
'W'
,
'i'
,
'n'
,
'e'
,
'\\'
,
'F'
,
'o'
,
'l'
,
'd'
,
'e'
,
'r'
,
'1'
,
'\\'
,
'F'
,
'o'
,
'l'
,
'd'
,
'e'
,
'r'
,
'2'
,
0
};
static
WCHAR
Folder1_Folder2
[]
=
{
'\\'
,
'F'
,
'o'
,
'l'
,
'd'
,
'e'
,
'r'
,
'1'
,
'\\'
,
'F'
,
'o'
,
'l'
,
'd'
,
'e'
,
'r'
,
'2'
,
0
};
static
const
WCHAR
Folder1
[]
=
{
'F'
,
'o'
,
'l'
,
'd'
,
'e'
,
'r'
,
'1'
,
0
};
static
const
WCHAR
Folder2
[]
=
{
'F'
,
'o'
,
'l'
,
'd'
,
'e'
,
'r'
,
'2'
,
0
};
HRESULT
hr
;
BSTR
bstr
;
VARIANT
v_null
;
ITaskService
*
service
;
ITaskFolder
*
folder
,
*
subfolder
;
ITaskFolder
*
folder
,
*
subfolder
,
*
subfolder2
;
hr
=
CoCreateInstance
(
&
CLSID_TaskScheduler
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_ITaskService
,
(
void
**
)
&
service
);
if
(
hr
!=
S_OK
)
...
...
@@ -162,6 +164,12 @@ todo_wine
todo_wine
ok
(
hr
==
E_POINTER
,
"expected E_POINTER, got %#x
\n
"
,
hr
);
hr
=
ITaskService_GetFolder
(
service
,
empty
,
&
folder
);
todo_wine
ok
(
hr
==
S_OK
,
"GetFolder error %#x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
ITaskFolder_Release
(
folder
);
hr
=
ITaskService_GetFolder
(
service
,
NULL
,
&
folder
);
todo_wine
ok
(
hr
==
S_OK
,
"GetFolder error %#x
\n
"
,
hr
);
...
...
@@ -198,6 +206,9 @@ todo_wine
hr
=
ITaskFolder_CreateFolder
(
folder
,
slash
,
v_null
,
&
subfolder
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_INVALID_NAME
),
"expected ERROR_INVALID_NAME, got %#x
\n
"
,
hr
);
hr
=
ITaskService_GetFolder
(
service
,
Wine_Folder1_Folder2
,
&
subfolder
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_PATH_NOT_FOUND
),
"expected ERROR_PATH_NOT_FOUND, got %#x
\n
"
,
hr
);
hr
=
ITaskFolder_CreateFolder
(
folder
,
bslash
,
v_null
,
&
subfolder
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %#x
\n
"
,
hr
);
...
...
@@ -266,8 +277,76 @@ todo_wine
SysFreeString
(
bstr
);
hr
=
ITaskFolder_get_Path
(
subfolder
,
&
bstr
);
ok
(
hr
==
S_OK
,
"get_Path error %#x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
bstr
,
Wine_Folder1
),
"expected Wine
\\
Folder1, got %s
\n
"
,
wine_dbgstr_w
(
bstr
));
ok
(
!
lstrcmpW
(
bstr
,
Wine_Folder1
),
"expected
\\
Wine
\\
Folder1, got %s
\n
"
,
wine_dbgstr_w
(
bstr
));
SysFreeString
(
bstr
);
ITaskFolder_Release
(
subfolder
);
hr
=
ITaskService_GetFolder
(
service
,
Wine
,
&
subfolder
);
ok
(
hr
==
S_OK
,
"GetFolder error %#x
\n
"
,
hr
);
hr
=
ITaskFolder_get_Name
(
subfolder
,
&
bstr
);
ok
(
hr
==
S_OK
,
"get_Name error %#x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
bstr
,
Wine
+
1
),
"expected Wine, got %s
\n
"
,
wine_dbgstr_w
(
bstr
));
SysFreeString
(
bstr
);
hr
=
ITaskFolder_get_Path
(
subfolder
,
&
bstr
);
ok
(
hr
==
S_OK
,
"get_Path error %#x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
bstr
,
Wine
),
"expected
\\
Wine, got %s
\n
"
,
wine_dbgstr_w
(
bstr
));
SysFreeString
(
bstr
);
ITaskFolder_Release
(
subfolder
);
hr
=
ITaskService_GetFolder
(
service
,
Wine
+
1
,
&
subfolder
);
ok
(
hr
==
S_OK
,
"GetFolder error %#x
\n
"
,
hr
);
hr
=
ITaskFolder_get_Name
(
subfolder
,
&
bstr
);
ok
(
hr
==
S_OK
,
"get_Name error %#x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
bstr
,
Wine
+
1
),
"expected Wine, got %s
\n
"
,
wine_dbgstr_w
(
bstr
));
SysFreeString
(
bstr
);
hr
=
ITaskFolder_get_Path
(
subfolder
,
&
bstr
);
ok
(
hr
==
S_OK
,
"get_Path error %#x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
bstr
,
Wine
+
1
),
"expected Wine, got %s
\n
"
,
wine_dbgstr_w
(
bstr
));
SysFreeString
(
bstr
);
hr
=
ITaskFolder_GetFolder
(
subfolder
,
bslash
,
&
subfolder2
);
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_INVALID_NAME
),
"expected ERROR_INVALID_NAME, got %#x
\n
"
,
hr
);
hr
=
ITaskFolder_GetFolder
(
subfolder
,
NULL
,
&
subfolder2
);
ok
(
hr
==
E_INVALIDARG
,
"expected E_INVALIDARG, got %#x
\n
"
,
hr
);
hr
=
ITaskFolder_GetFolder
(
subfolder
,
empty
,
&
subfolder2
);
ok
(
hr
==
S_OK
,
"GetFolder error %#x
\n
"
,
hr
);
hr
=
ITaskFolder_get_Name
(
subfolder2
,
&
bstr
);
ok
(
hr
==
S_OK
,
"get_Name error %#x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
bstr
,
Wine
+
1
),
"expected Wine, got %s
\n
"
,
wine_dbgstr_w
(
bstr
));
SysFreeString
(
bstr
);
hr
=
ITaskFolder_get_Path
(
subfolder2
,
&
bstr
);
ok
(
hr
==
S_OK
,
"get_Path error %#x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
bstr
,
Wine
+
1
),
"expected Wine, got %s
\n
"
,
wine_dbgstr_w
(
bstr
));
SysFreeString
(
bstr
);
ITaskFolder_Release
(
subfolder2
);
hr
=
ITaskFolder_GetFolder
(
subfolder
,
Folder1_Folder2
,
&
subfolder2
);
ok
(
hr
==
S_OK
,
"GetFolder error %#x
\n
"
,
hr
);
hr
=
ITaskFolder_get_Name
(
subfolder2
,
&
bstr
);
ok
(
hr
==
S_OK
,
"get_Name error %#x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
bstr
,
Folder2
),
"expected Folder2, got %s
\n
"
,
wine_dbgstr_w
(
bstr
));
SysFreeString
(
bstr
);
hr
=
ITaskFolder_get_Path
(
subfolder2
,
&
bstr
);
ok
(
hr
==
S_OK
,
"get_Path error %#x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
bstr
,
Wine_Folder1_Folder2
+
1
),
"expected Wine
\\
Folder1
\\
Folder2, got %s
\n
"
,
wine_dbgstr_w
(
bstr
));
SysFreeString
(
bstr
);
ITaskFolder_Release
(
subfolder2
);
hr
=
ITaskFolder_GetFolder
(
subfolder
,
Folder1_Folder2
+
1
,
&
subfolder2
);
ok
(
hr
==
S_OK
,
"GetFolder error %#x
\n
"
,
hr
);
hr
=
ITaskFolder_get_Name
(
subfolder2
,
&
bstr
);
ok
(
hr
==
S_OK
,
"get_Name error %#x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
bstr
,
Folder2
),
"expected Folder2, got %s
\n
"
,
wine_dbgstr_w
(
bstr
));
SysFreeString
(
bstr
);
hr
=
ITaskFolder_get_Path
(
subfolder2
,
&
bstr
);
ok
(
hr
==
S_OK
,
"get_Path error %#x
\n
"
,
hr
);
ok
(
!
lstrcmpW
(
bstr
,
Wine_Folder1_Folder2
+
1
),
"expected Wine
\\
Folder1
\\
Folder2, got %s
\n
"
,
wine_dbgstr_w
(
bstr
));
SysFreeString
(
bstr
);
ITaskFolder_Release
(
subfolder2
);
ITaskFolder_Release
(
subfolder
);
hr
=
ITaskFolder_DeleteFolder
(
folder
,
Wine_Folder1_Folder2
,
0
);
...
...
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