Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dex
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
dex
Commits
13f7dfae
Commit
13f7dfae
authored
Oct 21, 2016
by
Eric Chiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
connector/ldap: expand LDAP connector to include searches
parent
88896eb9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
ldap.go
connector/ldap/ldap.go
+0
-0
ldap_test.go
connector/ldap/ldap_test.go
+23
-0
No files found.
connector/ldap/ldap.go
View file @
13f7dfae
This diff is collapsed.
Click to expand it.
connector/ldap/ldap_test.go
0 → 100644
View file @
13f7dfae
package
ldap
import
"testing"
func
TestEscapeFilter
(
t
*
testing
.
T
)
{
tests
:=
[]
struct
{
val
string
want
string
}{
{
"Five*Star"
,
"Five
\\
2aStar"
},
{
"c:
\\
File"
,
"c:
\\
5cFile"
},
{
"John (2nd)"
,
"John
\\
282nd
\\
29"
},
{
string
([]
byte
{
0
,
0
,
0
,
4
}),
"
\\
00
\\
00
\\
00
\\
04"
},
{
"Chloé"
,
"Chlo
\\
c3
\\
a9"
},
}
for
_
,
tc
:=
range
tests
{
got
:=
escapeFilter
(
tc
.
val
)
if
tc
.
want
!=
got
{
t
.
Errorf
(
"value %q want=%q, got=%q"
,
tc
.
val
,
tc
.
want
,
got
)
}
}
}
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