Accept filters with only one clause to an & or |

This commit is contained in:
Jamstah 2011-01-06 14:06:31 +00:00
parent 5bc73d3aa3
commit f3204bde6d
3 changed files with 13 additions and 8 deletions

View file

@ -24,7 +24,8 @@ describe Net::LDAP::Filter do
'(o:dn:=Ace Industry)',
'(:dn:2.4.8.10:=Dino)',
'(cn:dn:1.2.3.4.5:=John Smith)',
'(sn:dn:2.4.6.8.10:=Barbara Jones)',
'(sn:dn:2.4.6.8.10:=Barbara Jones)',
'(&(sn:dn:2.4.6.8.10:=Barbara Jones))'
].each do |filter_str|
context "from_rfc2254(#{filter_str.inspect})" do
attr_reader :filter
@ -80,4 +81,4 @@ describe Net::LDAP::Filter do
Net::LDAP::Filter.escape('!&*:|~').should == "\\21\\26\\2A\\3A\\7C\\7E"
end
end
end
end