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
cdc92a7b
Commit
cdc92a7b
authored
Feb 23, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Feb 23, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
credui/tests: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2021c98b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
19 deletions
+18
-19
Makefile.in
dlls/credui/tests/Makefile.in
+0
-1
credui.c
dlls/credui/tests/credui.c
+18
-18
No files found.
dlls/credui/tests/Makefile.in
View file @
cdc92a7b
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
TESTDLL
=
credui.dll
IMPORTS
=
credui
...
...
dlls/credui/tests/credui.c
View file @
cdc92a7b
...
...
@@ -50,10 +50,10 @@ static void test_CredUIPromptForCredentials(void)
ret
=
CredUIConfirmCredentialsW
(
NULL
,
TRUE
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
/* 2003 + */
||
ret
==
ERROR_NOT_FOUND
/* XP */
,
"CredUIConfirmCredentials should have returned ERROR_INVALID_PARAMETER or ERROR_NOT_FOUND instead of %d
\n
"
,
ret
);
"CredUIConfirmCredentials should have returned ERROR_INVALID_PARAMETER or ERROR_NOT_FOUND instead of %
l
d
\n
"
,
ret
);
ret
=
CredUIConfirmCredentialsW
(
wszServerName
,
TRUE
);
ok
(
ret
==
ERROR_NOT_FOUND
,
"CredUIConfirmCredentials should have returned ERROR_NOT_FOUND instead of %d
\n
"
,
ret
);
ok
(
ret
==
ERROR_NOT_FOUND
,
"CredUIConfirmCredentials should have returned ERROR_NOT_FOUND instead of %
l
d
\n
"
,
ret
);
username
[
0
]
=
'\0'
;
password
[
0
]
=
'\0'
;
...
...
@@ -61,19 +61,19 @@ static void test_CredUIPromptForCredentials(void)
ARRAY_SIZE
(
username
),
password
,
ARRAY_SIZE
(
password
),
NULL
,
CREDUI_FLAGS_ALWAYS_SHOW_UI
);
ok
(
ret
==
ERROR_INVALID_FLAGS
,
"CredUIPromptForCredentials should have returned ERROR_INVALID_FLAGS instead of %d
\n
"
,
ret
);
ok
(
ret
==
ERROR_INVALID_FLAGS
,
"CredUIPromptForCredentials should have returned ERROR_INVALID_FLAGS instead of %
l
d
\n
"
,
ret
);
ret
=
CredUIPromptForCredentialsW
(
NULL
,
NULL
,
NULL
,
0
,
username
,
ARRAY_SIZE
(
username
),
password
,
ARRAY_SIZE
(
password
),
NULL
,
CREDUI_FLAGS_ALWAYS_SHOW_UI
|
CREDUI_FLAGS_GENERIC_CREDENTIALS
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"CredUIPromptForCredentials should have returned ERROR_INVALID_PARAMETER instead of %d
\n
"
,
ret
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"CredUIPromptForCredentials should have returned ERROR_INVALID_PARAMETER instead of %
l
d
\n
"
,
ret
);
ret
=
CredUIPromptForCredentialsW
(
NULL
,
wszServerName
,
NULL
,
0
,
username
,
ARRAY_SIZE
(
username
),
password
,
ARRAY_SIZE
(
password
),
NULL
,
CREDUI_FLAGS_SHOW_SAVE_CHECK_BOX
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"CredUIPromptForCredentials should have returned ERROR_INVALID_PARAMETER instead of %d
\n
"
,
ret
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"CredUIPromptForCredentials should have returned ERROR_INVALID_PARAMETER instead of %
l
d
\n
"
,
ret
);
if
(
winetest_interactive
)
{
...
...
@@ -81,11 +81,11 @@ static void test_CredUIPromptForCredentials(void)
ARRAY_SIZE
(
username
),
password
,
ARRAY_SIZE
(
password
),
&
save
,
CREDUI_FLAGS_EXPECT_CONFIRMATION
);
ok
(
ret
==
ERROR_SUCCESS
||
ret
==
ERROR_CANCELLED
,
"CredUIPromptForCredentials failed with error %d
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
||
ret
==
ERROR_CANCELLED
,
"CredUIPromptForCredentials failed with error %
l
d
\n
"
,
ret
);
if
(
ret
==
ERROR_SUCCESS
)
{
ret
=
CredUIConfirmCredentialsW
(
wszServerName
,
FALSE
);
ok
(
ret
==
ERROR_SUCCESS
,
"CredUIConfirmCredentials failed with error %d
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"CredUIConfirmCredentials failed with error %
l
d
\n
"
,
ret
);
}
credui_info
.
pszCaptionText
=
L"CREDUI_FLAGS_EXPECT_CONFIRMATION"
;
...
...
@@ -93,11 +93,11 @@ static void test_CredUIPromptForCredentials(void)
username
,
ARRAY_SIZE
(
username
),
password
,
ARRAY_SIZE
(
password
),
&
save
,
CREDUI_FLAGS_EXPECT_CONFIRMATION
);
ok
(
ret
==
ERROR_SUCCESS
||
ret
==
ERROR_CANCELLED
,
"CredUIPromptForCredentials failed with error %d
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
||
ret
==
ERROR_CANCELLED
,
"CredUIPromptForCredentials failed with error %
l
d
\n
"
,
ret
);
if
(
ret
==
ERROR_SUCCESS
)
{
ret
=
CredUIConfirmCredentialsW
(
wszServerName
,
FALSE
);
ok
(
ret
==
ERROR_SUCCESS
,
"CredUIConfirmCredentials failed with error %d
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"CredUIConfirmCredentials failed with error %
l
d
\n
"
,
ret
);
}
credui_info
.
pszCaptionText
=
L"CREDUI_FLAGS_INCORRECT_PASSWORD|CREDUI_FLAGS_EXPECT_CONFIRMATION"
;
...
...
@@ -105,11 +105,11 @@ static void test_CredUIPromptForCredentials(void)
username
,
ARRAY_SIZE
(
username
),
password
,
ARRAY_SIZE
(
password
),
NULL
,
CREDUI_FLAGS_INCORRECT_PASSWORD
|
CREDUI_FLAGS_EXPECT_CONFIRMATION
);
ok
(
ret
==
ERROR_SUCCESS
||
ret
==
ERROR_CANCELLED
,
"CredUIPromptForCredentials failed with error %d
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
||
ret
==
ERROR_CANCELLED
,
"CredUIPromptForCredentials failed with error %
l
d
\n
"
,
ret
);
if
(
ret
==
ERROR_SUCCESS
)
{
ret
=
CredUIConfirmCredentialsW
(
wszServerName
,
FALSE
);
ok
(
ret
==
ERROR_SUCCESS
,
"CredUIConfirmCredentials failed with error %d
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"CredUIConfirmCredentials failed with error %
l
d
\n
"
,
ret
);
}
...
...
@@ -119,7 +119,7 @@ static void test_CredUIPromptForCredentials(void)
username
,
ARRAY_SIZE
(
username
),
password
,
ARRAY_SIZE
(
password
),
&
save
,
CREDUI_FLAGS_DO_NOT_PERSIST
|
CREDUI_FLAGS_EXPECT_CONFIRMATION
);
ok
(
ret
==
ERROR_SUCCESS
||
ret
==
ERROR_CANCELLED
,
"CredUIPromptForCredentials failed with error %d
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
||
ret
==
ERROR_CANCELLED
,
"CredUIPromptForCredentials failed with error %
l
d
\n
"
,
ret
);
ok
(
save
,
"save flag should have been untouched
\n
"
);
save
=
FALSE
;
...
...
@@ -128,12 +128,12 @@ static void test_CredUIPromptForCredentials(void)
username
,
ARRAY_SIZE
(
username
),
password
,
ARRAY_SIZE
(
password
),
&
save
,
CREDUI_FLAGS_PERSIST
|
CREDUI_FLAGS_EXPECT_CONFIRMATION
);
ok
(
ret
==
ERROR_SUCCESS
||
ret
==
ERROR_CANCELLED
,
"CredUIPromptForCredentials failed with error %d
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
||
ret
==
ERROR_CANCELLED
,
"CredUIPromptForCredentials failed with error %
l
d
\n
"
,
ret
);
ok
(
!
save
,
"save flag should have been untouched
\n
"
);
if
(
ret
==
ERROR_SUCCESS
)
{
ret
=
CredUIConfirmCredentialsW
(
wszServerName
,
FALSE
);
ok
(
ret
==
ERROR_SUCCESS
,
"CredUIConfirmCredentials failed with error %d
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
,
"CredUIConfirmCredentials failed with error %
l
d
\n
"
,
ret
);
}
}
...
...
@@ -160,17 +160,17 @@ static void test_SspiPromptForCredentials(void)
info
.
pszCaptionText
=
L"basic"
;
info
.
hbmBanner
=
NULL
;
ret
=
pSspiPromptForCredentialsW
(
NULL
,
&
info
,
0
,
L"basic"
,
NULL
,
&
id
,
&
save
,
0
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"got %u
\n
"
,
ret
);
ok
(
ret
==
ERROR_INVALID_PARAMETER
,
"got %
l
u
\n
"
,
ret
);
ret
=
pSspiPromptForCredentialsW
(
L"SspiTest"
,
&
info
,
0
,
NULL
,
NULL
,
&
id
,
&
save
,
0
);
ok
(
ret
==
ERROR_NO_SUCH_PACKAGE
,
"got %u
\n
"
,
ret
);
ok
(
ret
==
ERROR_NO_SUCH_PACKAGE
,
"got %
l
u
\n
"
,
ret
);
if
(
winetest_interactive
)
{
id
=
NULL
;
save
=
-
1
;
ret
=
pSspiPromptForCredentialsW
(
L"SspiTest"
,
&
info
,
0
,
L"basic"
,
NULL
,
&
id
,
&
save
,
0
);
ok
(
ret
==
ERROR_SUCCESS
||
ret
==
ERROR_CANCELLED
,
"got %u
\n
"
,
ret
);
ok
(
ret
==
ERROR_SUCCESS
||
ret
==
ERROR_CANCELLED
,
"got %
l
u
\n
"
,
ret
);
if
(
ret
==
ERROR_SUCCESS
)
{
ok
(
id
!=
NULL
,
"id not set
\n
"
);
...
...
@@ -179,7 +179,7 @@ static void test_SspiPromptForCredentials(void)
username
=
creds
=
NULL
;
domain
=
(
const
WCHAR
*
)
0xdeadbeef
;
status
=
pSspiEncodeAuthIdentityAsStrings
(
id
,
&
username
,
&
domain
,
&
creds
);
ok
(
status
==
SEC_E_OK
,
"got %u
\n
"
,
status
);
ok
(
status
==
SEC_E_OK
,
"got %
l
u
\n
"
,
status
);
ok
(
username
!=
NULL
,
"username not set
\n
"
);
ok
(
domain
==
NULL
,
"domain not set
\n
"
);
ok
(
creds
!=
NULL
,
"creds not set
\n
"
);
...
...
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