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
e8d22f02
Commit
e8d22f02
authored
Aug 20, 2008
by
Roy Shea
Committed by
Alexandre Julliard
Aug 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mstask/tests: Basic conformance test for (Set|Get)AccountInformation.
parent
714c6d3a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
0 deletions
+72
-0
task.c
dlls/mstask/tests/task.c
+72
-0
No files found.
dlls/mstask/tests/task.c
View file @
e8d22f02
...
...
@@ -427,6 +427,77 @@ static void test_SetMaxRunTime_GetMaxRunTime(void)
return
;
}
static
void
test_SetAccountInformation_GetAccountInformation
(
void
)
{
BOOL
setup
;
HRESULT
hres
;
LPWSTR
account_name
;
const
WCHAR
dummy_account_name
[]
=
{
'N'
,
'o'
,
'S'
,
'u'
,
'c'
,
'h'
,
'A'
,
'c'
,
'c'
,
'o'
,
'u'
,
'n'
,
't'
,
0
};
setup
=
setup_task
();
ok
(
setup
,
"Failed to setup test_task
\n
"
);
if
(
!
setup
)
{
skip
(
"Failed to create task. Skipping tests.
\n
"
);
return
;
}
/* Get account information before it is set */
hres
=
ITask_GetAccountInformation
(
test_task
,
&
account_name
);
/* WinXP returns HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND): 0x80070002 but
* Win2K returns SCHED_E_CANNOT_OPEN_TASK: 0x8004130d */
todo_wine
ok
(
hres
==
HRESULT_FROM_WIN32
(
ERROR_FILE_NOT_FOUND
)
||
hres
==
SCHED_E_CANNOT_OPEN_TASK
,
"Unset account name generated: 0x%08x
\n
"
,
hres
);
/* Attempt to set to a dummy account without a password */
/* This test passes on WinXP but fails on Win2K */
hres
=
ITask_SetAccountInformation
(
test_task
,
dummy_account_name
,
NULL
);
todo_wine
ok
(
hres
==
S_OK
,
"Failed setting dummy account with no password: %08x
\n
"
,
hres
);
hres
=
ITask_GetAccountInformation
(
test_task
,
&
account_name
);
todo_wine
ok
(
hres
==
S_OK
,
"GetAccountInformation failed: %08x
\n
"
,
hres
);
if
(
hres
==
S_OK
)
{
todo_wine
ok
(
!
lstrcmpW
(
account_name
,
dummy_account_name
),
"Got %s, expected %s
\n
"
,
dbgstr_w
(
account_name
),
dbgstr_w
(
dummy_account_name
));
CoTaskMemFree
(
account_name
);
}
/* Attempt to set to a dummy account with a (invalid) password */
/* This test passes on WinXP but fails on Win2K */
hres
=
ITask_SetAccountInformation
(
test_task
,
dummy_account_name
,
dummy_account_name
);
todo_wine
ok
(
hres
==
S_OK
,
"Failed setting dummy account with password: %08x
\n
"
,
hres
);
hres
=
ITask_GetAccountInformation
(
test_task
,
&
account_name
);
todo_wine
ok
(
hres
==
S_OK
,
"GetAccountInformation failed: %08x
\n
"
,
hres
);
if
(
hres
==
S_OK
)
{
todo_wine
ok
(
!
lstrcmpW
(
account_name
,
dummy_account_name
),
"Got %s, expected %s
\n
"
,
dbgstr_w
(
account_name
),
dbgstr_w
(
dummy_account_name
));
CoTaskMemFree
(
account_name
);
}
/* Attempt to set to the local system account */
hres
=
ITask_SetAccountInformation
(
test_task
,
empty
,
NULL
);
todo_wine
ok
(
hres
==
S_OK
,
"Failed setting system account: %08x
\n
"
,
hres
);
hres
=
ITask_GetAccountInformation
(
test_task
,
&
account_name
);
todo_wine
ok
(
hres
==
S_OK
,
"GetAccountInformation failed: %08x
\n
"
,
hres
);
if
(
hres
==
S_OK
)
{
todo_wine
ok
(
!
lstrcmpW
(
account_name
,
empty
),
"Got %s, expected empty string
\n
"
,
dbgstr_w
(
account_name
));
CoTaskMemFree
(
account_name
);
}
cleanup_task
();
return
;
}
START_TEST
(
task
)
{
CoInitialize
(
NULL
);
...
...
@@ -435,5 +506,6 @@ START_TEST(task)
test_SetParameters_GetParameters
();
test_SetComment_GetComment
();
test_SetMaxRunTime_GetMaxRunTime
();
test_SetAccountInformation_GetAccountInformation
();
CoUninitialize
();
}
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