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
82bcbcc5
Commit
82bcbcc5
authored
Apr 20, 2020
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Apr 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wldap32/tests: Add a test for LDAP paged search.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
86bc6a28
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
62 additions
and
0 deletions
+62
-0
parse.c
dlls/wldap32/tests/parse.c
+62
-0
No files found.
dlls/wldap32/tests/parse.c
View file @
82bcbcc5
...
...
@@ -212,10 +212,72 @@ static void test_ldap_server_control( void )
ldap_unbind
(
ld
);
}
static
void
test_ldap_paged_search
(
void
)
{
LDAP
*
ld
;
ULONG
ret
,
count
;
int
version
;
LDAPSearch
*
search
;
LDAPMessage
*
res
,
*
entry
;
BerElement
*
ber
;
WCHAR
*
attr
;
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
;
}
search
=
ldap_search_init_pageW
(
ld
,
(
WCHAR
*
)
L""
,
LDAP_SCOPE_BASE
,
(
WCHAR
*
)
L"(objectclass=*)"
,
NULL
,
FALSE
,
NULL
,
NULL
,
0
,
0
,
NULL
);
ok
(
search
!=
NULL
,
"ldap_search_init_page failed
\n
"
);
count
=
0xdeadbeef
;
res
=
NULL
;
ret
=
ldap_get_next_page_s
(
ld
,
search
,
NULL
,
1
,
&
count
,
&
res
);
ok
(
!
ret
,
"ldap_get_next_page_s failed 0x%x
\n
"
,
ret
);
ok
(
res
!=
NULL
,
"expected res != NULL
\n
"
);
ok
(
count
==
0
,
"got %u
\n
"
,
count
);
count
=
ldap_count_entries
(
ld
,
res
);
ok
(
count
==
1
,
"got %u
\n
"
,
count
);
entry
=
ldap_first_entry
(
ld
,
res
);
ok
(
res
!=
NULL
,
"expected entry != NULL
\n
"
);
attr
=
ldap_first_attributeW
(
ld
,
entry
,
&
ber
);
ok
(
!
wcscmp
(
attr
,
L"objectClass"
),
"got %s
\n
"
,
wine_dbgstr_w
(
attr
)
);
ldap_memfreeW
(
attr
);
attr
=
ldap_next_attributeW
(
ld
,
entry
,
ber
);
ok
(
!
attr
,
"got %s
\n
"
,
wine_dbgstr_w
(
attr
));
ber_free
(
ber
,
0
);
ldap_msgfree
(
res
);
count
=
0xdeadbeef
;
res
=
(
void
*
)
0xdeadbeef
;
ret
=
ldap_get_next_page_s
(
ld
,
search
,
NULL
,
1
,
&
count
,
&
res
);
ok
(
ret
==
LDAP_NO_RESULTS_RETURNED
,
"got 0x%x
\n
"
,
ret
);
todo_wine
ok
(
!
res
,
"expected res == NULL
\n
"
);
todo_wine
ok
(
count
==
0
,
"got %u
\n
"
,
count
);
ldap_search_abandon_page
(
ld
,
search
);
ldap_unbind
(
ld
);
}
START_TEST
(
parse
)
{
LDAP
*
ld
;
test_ldap_paged_search
();
test_ldap_server_control
();
test_ldap_bind_sA
();
...
...
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