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
56c1590d
Commit
56c1590d
authored
Mar 10, 2020
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Mar 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wldap32/tests: Add ldap_bind_s test.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5ca1d28e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
parse.c
dlls/wldap32/tests/parse.c
+34
-0
No files found.
dlls/wldap32/tests/parse.c
View file @
56c1590d
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
* test parsing functions
* test parsing functions
*
*
* Copyright 2008 Hans Leidekker for CodeWeavers
* Copyright 2008 Hans Leidekker for CodeWeavers
* Copyright 2020 Dmitry Timoshkov
*
*
* This library is free software; you can redistribute it and/or
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* modify it under the terms of the GNU Lesser General Public
...
@@ -26,6 +27,10 @@
...
@@ -26,6 +27,10 @@
#include "wine/test.h"
#include "wine/test.h"
#ifndef LDAP_AUTH_SIMPLE
#define LDAP_AUTH_SIMPLE 0x80
#endif
static
void
test_ldap_parse_sort_control
(
LDAP
*
ld
)
static
void
test_ldap_parse_sort_control
(
LDAP
*
ld
)
{
{
ULONG
ret
,
result
;
ULONG
ret
,
result
;
...
@@ -132,10 +137,39 @@ static void test_ldap_get_optionW( LDAP *ld )
...
@@ -132,10 +137,39 @@ static void test_ldap_get_optionW( LDAP *ld )
ok
(
version
==
LDAP_VERSION3
,
"got %u
\n
"
,
version
);
ok
(
version
==
LDAP_VERSION3
,
"got %u
\n
"
,
version
);
}
}
static
void
test_ldap_bind_sA
(
void
)
{
LDAP
*
ld
;
ULONG
ret
;
int
version
;
ld
=
ldap_initA
(
(
char
*
)
"ldap.forumsys.com"
,
389
);
ok
(
ld
!=
NULL
,
"ldap_init failed
\n
"
);
version
=
LDAP_VERSION3
;
ret
=
ldap_set_optionW
(
ld
,
LDAP_OPT_PROTOCOL_VERSION
,
&
version
);
if
(
ret
==
LDAP_SERVER_DOWN
||
ret
==
LDAP_UNAVAILABLE
)
{
skip
(
"test server can't be reached
\n
"
);
ldap_unbind
(
ld
);
return
;
}
ret
=
ldap_connect
(
ld
,
NULL
);
ok
(
!
ret
,
"ldap_connect failed 0x%08x
\n
"
,
ret
);
ret
=
ldap_bind_sA
(
ld
,
(
char
*
)
"CN=read-only-admin,DC=example,DC=com"
,
(
char
*
)
"password"
,
LDAP_AUTH_SIMPLE
);
ok
(
!
ret
,
"ldap_bind_s failed 0x%08x
\n
"
,
ret
);
ldap_unbind
(
ld
);
}
START_TEST
(
parse
)
START_TEST
(
parse
)
{
{
LDAP
*
ld
;
LDAP
*
ld
;
test_ldap_bind_sA
();
ld
=
ldap_initA
((
char
*
)
"ldap.itd.umich.edu"
,
389
);
ld
=
ldap_initA
((
char
*
)
"ldap.itd.umich.edu"
,
389
);
ok
(
ld
!=
NULL
,
"ldap_init failed
\n
"
);
ok
(
ld
!=
NULL
,
"ldap_init failed
\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