38
38
# from RFC2255, section 6.
40
40
'ldap:///o=University%20of%20Michigan,c=US' =>
41
['ldap', nil, URI::LDAP::DEFAULT_PORT,
42
'o=University%20of%20Michigan,c=US',
41
['ldap', nil, URI::LDAP::DEFAULT_PORT,
42
'o=University%20of%20Michigan,c=US',
43
43
nil, nil, nil, nil],
45
45
'ldap://ldap.itd.umich.edu/o=University%20of%20Michigan,c=US' =>
46
['ldap', 'ldap.itd.umich.edu', URI::LDAP::DEFAULT_PORT,
47
'o=University%20of%20Michigan,c=US',
46
['ldap', 'ldap.itd.umich.edu', URI::LDAP::DEFAULT_PORT,
47
'o=University%20of%20Michigan,c=US',
48
48
nil, nil, nil, nil],
50
50
'ldap://ldap.itd.umich.edu/o=University%20of%20Michigan,c=US?postalAddress' =>
51
['ldap', 'ldap.itd.umich.edu', URI::LDAP::DEFAULT_PORT,
51
['ldap', 'ldap.itd.umich.edu', URI::LDAP::DEFAULT_PORT,
52
52
'o=University%20of%20Michigan,c=US',
53
53
'postalAddress', nil, nil, nil],
55
55
'ldap://host.com:6666/o=University%20of%20Michigan,c=US??sub?(cn=Babs%20Jensen)' =>
56
['ldap', 'host.com', 6666,
56
['ldap', 'host.com', 6666,
57
57
'o=University%20of%20Michigan,c=US',
58
58
nil, 'sub', '(cn=Babs%20Jensen)', nil],
60
60
'ldap://ldap.itd.umich.edu/c=GB?objectClass?one' =>
61
['ldap', 'ldap.itd.umich.edu', URI::LDAP::DEFAULT_PORT,
61
['ldap', 'ldap.itd.umich.edu', URI::LDAP::DEFAULT_PORT,
63
63
'objectClass', 'one', nil, nil],
65
65
'ldap://ldap.question.com/o=Question%3f,c=US?mail' =>
66
['ldap', 'ldap.question.com', URI::LDAP::DEFAULT_PORT,
66
['ldap', 'ldap.question.com', URI::LDAP::DEFAULT_PORT,
67
67
'o=Question%3f,c=US',
68
68
'mail', nil, nil, nil],
70
70
'ldap://ldap.netscape.com/o=Babsco,c=US??(int=%5c00%5c00%5c00%5c04)' =>
71
['ldap', 'ldap.netscape.com', URI::LDAP::DEFAULT_PORT,
71
['ldap', 'ldap.netscape.com', URI::LDAP::DEFAULT_PORT,
73
73
nil, '(int=%5c00%5c00%5c00%5c04)', nil, nil],
75
75
'ldap:///??sub??bindname=cn=Manager%2co=Foo' =>
76
['ldap', nil, URI::LDAP::DEFAULT_PORT,
76
['ldap', nil, URI::LDAP::DEFAULT_PORT,
78
78
nil, 'sub', nil, 'bindname=cn=Manager%2co=Foo'],
80
80
'ldap:///??sub??!bindname=cn=Manager%2co=Foo' =>
81
['ldap', nil, URI::LDAP::DEFAULT_PORT,
81
['ldap', nil, URI::LDAP::DEFAULT_PORT,
83
83
nil, 'sub', nil, '!bindname=cn=Manager%2co=Foo'],
86
86
assert_equal(ary, uri_to_ary(u))