99 end
1010 it "should convert to 'foo:=bar'" do
1111 filter . to_s . should == '(foo:=bar)'
12- end
12+ end
1313 it "should survive roundtrip via to_s/from_rfc2254" do
1414 Net ::LDAP ::Filter . from_rfc2254 ( filter . to_s ) . should == filter
15- end
15+ end
1616 it "should survive roundtrip conversion to/from ber" do
1717 ber = filter . to_ber
1818 Net ::LDAP ::Filter . parse_ber ( ber . read_ber ( Net ::LDAP ::AsnSyntax ) ) . should ==
1919 filter
20- end
20+ end
2121 end
2222 context "various legal inputs" do
2323 [
24- '(o:dn:=Ace Industry)' ,
25- '(:dn:2.4.8.10:=Dino)' ,
26- '(cn:dn:1.2.3.4.5:=John Smith)' ,
24+ '(o:dn:=Ace Industry)' ,
25+ '(:dn:2.4.8.10:=Dino)' ,
26+ '(cn:dn:1.2.3.4.5:=John Smith)' ,
2727 '(sn:dn:2.4.6.8.10:=Barbara Jones)' ,
2828 '(&(sn:dn:2.4.6.8.10:=Barbara Jones))'
2929 ] . each do |filter_str |
3535
3636 it "should decode into a Net::LDAP::Filter" do
3737 filter . should be_an_instance_of ( Net ::LDAP ::Filter )
38- end
38+ end
3939 it "should survive roundtrip conversion to/from ber" do
4040 ber = filter . to_ber
4141 Net ::LDAP ::Filter . parse_ber ( ber . read_ber ( Net ::LDAP ::AsnSyntax ) ) . should ==
4242 filter
43- end
43+ end
4444 end
4545 end
4646 end
4747 end
4848 describe "<- .construct" do
4949 it "should accept apostrophes in filters (regression)" do
5050 Net ::LDAP ::Filter . construct ( "uid=O'Keefe" ) . to_rfc2254 . should == "(uid=O'Keefe)"
51- end
51+ end
5252 end
5353
5454 describe "convenience filter constructors" do
@@ -58,28 +58,28 @@ def eq(attribute, value)
5858 describe "<- .equals(attr, val)" do
5959 it "should delegate to .eq with escaping" do
6060 described_class . equals ( 'dn' , 'f*oo' ) . should == eq ( 'dn' , 'f\2Aoo' )
61- end
61+ end
6262 end
6363 describe "<- .begins(attr, val)" do
6464 it "should delegate to .eq with escaping" do
6565 described_class . begins ( 'dn' , 'f*oo' ) . should == eq ( 'dn' , 'f\2Aoo*' )
66- end
66+ end
6767 end
6868 describe "<- .ends(attr, val)" do
6969 it "should delegate to .eq with escaping" do
7070 described_class . ends ( 'dn' , 'f*oo' ) . should == eq ( 'dn' , '*f\2Aoo' )
71- end
71+ end
7272 end
7373 describe "<- .contains(attr, val)" do
7474 it "should delegate to .eq with escaping" do
7575 described_class . contains ( 'dn' , 'f*oo' ) . should == eq ( 'dn' , '*f\2Aoo*' )
76- end
76+ end
7777 end
7878 end
7979 describe "<- .escape(str)" do
8080 it "should escape nul, *, (, ) and \\ " do
8181 Net ::LDAP ::Filter . escape ( "\0 *()\\ " ) . should == "\\ 00\\ 2A\\ 28\\ 29\\ 5C"
82- end
82+ end
8383 end
8484
8585 context 'with a well-known BER string' do
0 commit comments