directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1292077 - in /directory: apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/ shared/trunk/integ/src/...
Date Tue, 21 Feb 2012 23:37:27 GMT
Author: elecharny
Date: Tue Feb 21 23:37:26 2012
New Revision: 1292077

URL: http://svn.apache.org/viewvc?rev=1292077&view=rev
Log:
Fixed the RDN handling of special characters

Modified:
    directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
    directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlPartitionTest.java
    directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/entry/SchemaAwareAttributeSerializationTest.java
    directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/model/name/DnTest.java
    directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/model/name/RdnTest.java
    directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/model/name/SchemaAwareRdnTest.java
    directory/shared/trunk/ldap/model/src/main/antlr/distinguishedName.g
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/name/RdnTest.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DnSyntaxCheckerTest.java
    directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/NameAndOptionalUIDSyntaxCheckerTest.java

Modified: directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java?rev=1292077&r1=1292076&r2=1292077&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
(original)
+++ directory/apacheds/trunk/jdbm-partition/src/test/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStoreTest.java
Tue Feb 21 23:37:26 2012
@@ -761,7 +761,7 @@ public class JdbmStoreTest
         Long id = store.getEntryId( dn2 );
         assertNotNull( id );
         Entry entry2 = store.lookup( id );
-        assertEquals( "Ja\\+es", entry2.get( "sn" ).getString() );
+        assertEquals( "Ja+es", entry2.get( "sn" ).getString() );
     }
 
 

Modified: directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlPartitionTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlPartitionTest.java?rev=1292077&r1=1292076&r2=1292077&view=diff
==============================================================================
--- directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlPartitionTest.java
(original)
+++ directory/apacheds/trunk/xdbm-partition/src/test/java/org/apache/directory/server/xdbm/impl/avl/AvlPartitionTest.java
Tue Feb 21 23:37:26 2012
@@ -656,8 +656,8 @@ public class AvlPartitionTest
         Long id = partition.getEntryId( dn2 );
         assertNotNull( id );
         Entry entry2 = partition.lookup( id );
-        assertEquals( "Ja\\+es", entry2.get( "sn" ).getString() );
-        assertEquals( "ja\\+es", entry2.get( "sn" ).get().getNormValue() );
+        assertEquals( "Ja+es", entry2.get( "sn" ).getString() );
+        assertEquals( "ja+es", entry2.get( "sn" ).get().getNormValue() );
     }
 
 

Modified: directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/entry/SchemaAwareAttributeSerializationTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/entry/SchemaAwareAttributeSerializationTest.java?rev=1292077&r1=1292076&r2=1292077&view=diff
==============================================================================
--- directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/entry/SchemaAwareAttributeSerializationTest.java
(original)
+++ directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/entry/SchemaAwareAttributeSerializationTest.java
Tue Feb 21 23:37:26 2012
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.shared.ldap.entry;
 
@@ -36,10 +36,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.schemamanager.impl.DefaultSchemaManager;
 import org.junit.BeforeClass;
 import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import com.mycila.junit.concurrent.Concurrency;
-import com.mycila.junit.concurrent.ConcurrentJunitRunner;
 
 
 /**
@@ -47,8 +43,6 @@ import com.mycila.junit.concurrent.Concu
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-@RunWith(ConcurrentJunitRunner.class)
-@Concurrency()
 public class SchemaAwareAttributeSerializationTest
 {
     private static byte[] data1 = new byte[]

Modified: directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/model/name/DnTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/model/name/DnTest.java?rev=1292077&r1=1292076&r2=1292077&view=diff
==============================================================================
--- directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/model/name/DnTest.java
(original)
+++ directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/model/name/DnTest.java
Tue Feb 21 23:37:26 2012
@@ -2495,7 +2495,7 @@ public class DnTest
         assertEquals( " cn = Amos\\,Tori ", dn1.getRdn().getName() );
         Ava atav1 = dn1.getRdn().getAva();
         assertEquals( "cn", atav1.getType() );
-        assertEquals( " Amos\\,Tori ", atav1.getValue().getString() );
+        assertEquals( "Amos,Tori", atav1.getValue().getString() );
 
         // antlr parser: hexstring with trailing spaces
         Dn dn3 = new Dn( " cn = #414243 , ou=system " );
@@ -2510,7 +2510,7 @@ public class DnTest
         assertEquals( " cn = \\41\\42\\43 ", dn4.getRdn().getName() );
         Ava atav4 = dn4.getRdn().getAva();
         assertEquals( "cn", atav4.getType() );
-        assertEquals( " \\41\\42\\43 ", atav4.getValue().getString() );
+        assertEquals( "ABC", atav4.getValue().getString() );
         assertEquals( "ABC", atav4.getNormValue().getString() );
 
         // antlr parser: quotestring with trailing spaces
@@ -2518,7 +2518,7 @@ public class DnTest
         assertEquals( " cn = \"ABC\" ", dn5.getRdn().getName() );
         Ava atav5 = dn5.getRdn().getAva();
         assertEquals( "cn", atav5.getType() );
-        assertEquals( " \"ABC\" ", atav5.getValue().getString() );
+        assertEquals( "\"ABC\"", atav5.getValue().getString() );
         assertEquals( "ABC", atav5.getNormValue().getString() );
 
         // fast parser: string value with trailing spaces
@@ -2649,7 +2649,7 @@ public class DnTest
         assertEquals( "example", rdn.getNormValue().getString() );
         assertEquals( "2.5.4.11=example+2.5.4.3=test", rdn.getNormName() );
         assertEquals( "ou", rdn.getUpType() );
-        assertEquals( "  Example ", rdn.getUpValue().getString() );
+        assertEquals( "Example", rdn.getUpValue().getString() );
         assertEquals( "  ou  =  Example + cn = TEST ", rdn.getName() );
 
         // The first ATAV
@@ -2660,7 +2660,7 @@ public class DnTest
         assertEquals( "example", atav.getNormValue().getValue() );
 
         assertEquals( "ou", atav.getType() );
-        assertEquals( "  Example ", atav.getValue().getValue() );
+        assertEquals( "Example", atav.getValue().getValue() );
 
         assertEquals( "  ou  =  Example ", atav.getName() );
 
@@ -2680,7 +2680,7 @@ public class DnTest
             assertEquals( "test", ava.getNormValue().getValue() );
 
             assertEquals( "cn", ava.getType() );
-            assertEquals( " TEST ", ava.getValue().getValue() );
+            assertEquals( "TEST", ava.getValue().getValue() );
             assertEquals( " cn = TEST ", ava.getName() );
         }
     }
@@ -2700,7 +2700,7 @@ public class DnTest
         assertEquals( "ex+mple", rdn.getNormValue().getString() );
         assertEquals( "2.5.4.11=ex\\+mple", rdn.getNormName() );
         assertEquals( "ou", rdn.getUpType() );
-        assertEquals( "  Ex\\+mple ", rdn.getUpValue().getString() );
+        assertEquals( "Ex+mple", rdn.getUpValue().getString() );
         assertEquals( "  ou  =  Ex\\+mple ", rdn.getName() );
 
         Ava atav = rdn.getAva();
@@ -2710,7 +2710,7 @@ public class DnTest
         assertEquals( "ex+mple", atav.getNormValue().getValue() );
 
         assertEquals( "ou", atav.getType() );
-        assertEquals( "  Ex\\+mple ", atav.getValue().getValue() );
+        assertEquals( "Ex+mple", atav.getValue().getValue() );
 
         assertEquals( "  ou  =  Ex\\+mple ", atav.getName() );
     }
@@ -2734,7 +2734,7 @@ public class DnTest
         assertEquals( "OU", rdn.getUpType() );
         assertEquals( "ou", rdn.getNormType() );
 
-        assertEquals( "  Ex\\+mple ", rdn.getUpValue().getString() );
+        assertEquals( "Ex+mple", rdn.getUpValue().getString() );
         assertEquals( "Ex+mple", rdn.getNormValue().getString() );
 
         // The first ATAV
@@ -2746,7 +2746,7 @@ public class DnTest
         assertEquals( "ou", atav.getNormType() );
         assertEquals( "OU", atav.getType() );
 
-        assertEquals( "  Ex\\+mple ", atav.getValue().getValue() );
+        assertEquals( "Ex+mple", atav.getValue().getValue() );
         assertEquals( "Ex+mple", atav.getNormValue().getValue() );
 
         assertEquals( 2, rdn.size() );
@@ -2766,7 +2766,7 @@ public class DnTest
             assertEquals( "cn", ava.getType() );
             assertEquals( "cn", ava.getNormType() );
 
-            assertEquals( " T\\+ST\\  ", ava.getValue().getValue() );
+            assertEquals( "T+ST", ava.getValue().getValue() );
             assertEquals( "T+ST ", ava.getNormValue().getValue() );
         }
 
@@ -2785,7 +2785,7 @@ public class DnTest
         assertEquals( "OU", rdn.getUpType() );
         assertEquals( "2.5.4.11", rdn.getNormType() );
 
-        assertEquals( "  Ex\\+mple ", rdn.getUpValue().getString() );
+        assertEquals( "Ex+mple", rdn.getUpValue().getString() );
         assertEquals( "ex+mple", rdn.getNormValue().getString() );
 
         // The first ATAV
@@ -2797,7 +2797,7 @@ public class DnTest
         assertEquals( "2.5.4.11", atav.getNormType() );
         assertEquals( "OU", atav.getType() );
 
-        assertEquals( "  Ex\\+mple ", atav.getValue().getValue() );
+        assertEquals( "Ex+mple", atav.getValue().getValue() );
         assertEquals( "ex+mple", atav.getNormValue().getValue() );
 
         assertEquals( 2, rdn.size() );
@@ -2817,7 +2817,7 @@ public class DnTest
             assertEquals( "cn", ava.getType() );
             assertEquals( "2.5.4.3", ava.getNormType() );
 
-            assertEquals( " T\\+ST\\  ", ava.getValue().getValue() );
+            assertEquals( "T+ST", ava.getValue().getValue() );
             assertEquals( "t+st", ava.getNormValue().getValue() );
         }
     }

Modified: directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/model/name/RdnTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/model/name/RdnTest.java?rev=1292077&r1=1292076&r2=1292077&view=diff
==============================================================================
--- directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/model/name/RdnTest.java
(original)
+++ directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/model/name/RdnTest.java
Tue Feb 21 23:37:26 2012
@@ -25,6 +25,7 @@ import org.apache.directory.shared.ldap.
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import static org.junit.Assert.assertEquals;
 
 import com.mycila.junit.concurrent.Concurrency;
 import com.mycila.junit.concurrent.ConcurrentJunitRunner;
@@ -50,7 +51,6 @@ public class RdnTest
     @Test
     public void testRdnValuesNoSchema() throws LdapException
     {
-        /*
         String errors = null;
         
         Rdn rdn = new Rdn( "OU = Exemple \\+ Rdn\\C3\\A4\\ +cn= TEST" );
@@ -80,7 +80,7 @@ public class RdnTest
             errors += "\nRdn.getUpType fails '" + rdn.getUpType() + "'";
         }
         
-        if ( !"Exemple + Rdn\u00E4 ".equals( rdn.getUpValue().getString() ) )
+        if ( !"Exemple + Rdn\u00E4".equals( rdn.getUpValue().getString() ) )
         {
             errors += "\nRdn.getUpValue fails '" + rdn.getUpValue() + "'";
         }
@@ -116,7 +116,7 @@ public class RdnTest
             errors += "\nRdn.getName fails '" + rdn.getName() + "'";
         }
         
-        if ( !"2.5.4.11=exemple \\+ rdn\\C3\\A4\\ +2.5.4.3=test" .equals( rdn.getNormName()
) )
+        if ( !"2.5.4.11=exemple \\+ rdn\\C3\\A4+2.5.4.3=test" .equals( rdn.getNormName()
) )
         {
             errors = "\nRdn.getNormName fails '" + rdn.getNormName() + "'";
         }
@@ -126,7 +126,7 @@ public class RdnTest
             errors += "\nRdn.getNormType fails '" + rdn.getNormType() + "'";
         }
         
-        if ( !"exemple + rdn\u00E4 ".equals( rdn.getNormValue().getString() ) )
+        if ( !"exemple + rdn\u00E4".equals( rdn.getNormValue().getString() ) )
         {
             errors += "\nRdn.getNormValue fails '" + rdn.getNormValue().getString() + "'";
         }
@@ -136,19 +136,19 @@ public class RdnTest
             errors += "\nRdn.getUpType fails '" + rdn.getUpType() + "'";
         }
         
-        if ( !"Exemple + Rdn\u00E4 ".equals( rdn.getUpValue().getString() ) )
+        if ( !"Exemple + Rdn\u00E4".equals( rdn.getUpValue().getString() ) )
         {
             errors += "\nRdn.getUpValue fails '" + rdn.getUpValue().getString() + "'";
         }
         
-        if ( !"Exemple + Rdn\u00E4 ".equals( rdn.getValue( "ou" ).toString() ) )
+        if ( !"exemple + rdn\u00E4".equals( rdn.getValue( "ou" ) ) )
         {
-            errors += "\nRdn.getValue( 'ou' ) fails '" + rdn.getValue( "ou" ) + "'";
+            errors += "\nRdn.getValue( 'ou' ) fails '" + (String)rdn.getValue( "ou" ) + "'";
         }
         
-        if ( !"TEST".equals( rdn.getValue( "cn" ).toString() ) )
+        if ( !"test".equals( rdn.getValue( "cn" ) ) )
         {
-            errors += "\nRdn.getValue( 'test' ) fails '" + rdn.getValue( "cn" ) + "'";
+            errors += "\nRdn.getValue( 'cn' ) fails '" + (String)rdn.getValue( "cn" ) + "'";
         }
         
         if ( !"OU = Exemple \\+ Rdn\\C3\\A4\\ +cn= TEST".equals( rdn.toString() ) )
@@ -157,6 +157,5 @@ public class RdnTest
         }
         
         assertEquals( null, errors );
-    */
     }
 }

Modified: directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/model/name/SchemaAwareRdnTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/model/name/SchemaAwareRdnTest.java?rev=1292077&r1=1292076&r2=1292077&view=diff
==============================================================================
--- directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/model/name/SchemaAwareRdnTest.java
(original)
+++ directory/shared/trunk/integ/src/test/java/org/apache/directory/shared/ldap/model/name/SchemaAwareRdnTest.java
Tue Feb 21 23:37:26 2012
@@ -232,7 +232,7 @@ public class SchemaAwareRdnTest
     public void testRdnPairCharAttributeValue() throws LdapException
     {
         String rdn = Strings.utf8ToString( new byte[]
-            { 'l', '=', '\\', ',', '=', '\\', '+', '\\', '<', '\\', '>', '#', '\\',
';', '\\', '\\', '\\', '"', '\\',
+            { 'l', '=', '\\', ',', '\\', '=', '\\', '+', '\\', '<', '\\', '>', '#',
'\\', ';', '\\', '\\', '\\', '"', '\\',
                 'C', '3', '\\', 'A', '9' } );
         assertEquals( "2.5.4.7=\\,\\=\\+\\<\\>#\\;\\\\\\\"\\C3\\A9", new Rdn( schemaManager,
rdn ).getNormName() );
     }

Modified: directory/shared/trunk/ldap/model/src/main/antlr/distinguishedName.g
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/antlr/distinguishedName.g?rev=1292077&r1=1292076&r2=1292077&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/antlr/distinguishedName.g (original)
+++ directory/shared/trunk/ldap/model/src/main/antlr/distinguishedName.g Tue Feb 21 23:37:26
2012
@@ -347,14 +347,29 @@ attributeTypeAndValue [Rdn rdn] returns 
                     {
                         value.rawValue = upValue + value.rawValue;
                     }
-
-                    ava = new Ava(
-                        type,
-                        type,
-                        new StringValue( (String)value.rawValue ),
-                        new StringValue( (String)value.value ), 
-                        upName
-                    );
+                    
+                    Object unescapedValue = Rdn.unescapeValue( Strings.trim( (String)value.rawValue
) );
+                    
+                    if ( unescapedValue instanceof String )
+                    {
+                        ava = new Ava(
+                            type,
+                            type,
+                            new StringValue( (String)unescapedValue ),
+                            new StringValue( (String)value.value ), 
+                            upName
+                        );
+                    }
+                    else
+                    {
+                        ava = new Ava(
+                            type,
+                            type,
+                            new BinaryValue( (byte[])unescapedValue ),
+                            new StringValue( (String)value.value ), 
+                            upName
+                        );
+                    }
                 }
                 else
                 {

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java?rev=1292077&r1=1292076&r2=1292077&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java
(original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/shared/ldap/model/name/Rdn.java
Tue Feb 21 23:37:26 2012
@@ -1065,6 +1065,12 @@ public class Rdn implements Cloneable, E
         }
 
         char[] chars = value.toCharArray();
+        
+        // If the value is contained into double quotes, return it as is.
+        if ( ( chars[0] == '\"' ) && ( chars[chars.length - 1] == '\"' ) )
+        {
+            return value;
+        }
 
         if ( chars[0] == '#' )
         {
@@ -1145,6 +1151,7 @@ public class Rdn implements Cloneable, E
                         {
                             pair += Hex.getHexValue( chars[i] );
                             bytes[pos++] = pair;
+                            isHex = false;
                         }
                     }
                     else

Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/name/RdnTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/name/RdnTest.java?rev=1292077&r1=1292076&r2=1292077&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/name/RdnTest.java
(original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/name/RdnTest.java
Tue Feb 21 23:37:26 2012
@@ -224,7 +224,7 @@ public class RdnTest
     public void testRdnPairCharAttributeValue() throws LdapException
     {
         String rdn = Strings.utf8ToString( new byte[]
-            { 'a', '=', '\\', ',', '=', '\\', '+', '\\', '<', '\\', '>', '#', '\\',
';', '\\', '\\', '\\', '"', '\\',
+            { 'a', '=', '\\', ',', '\\', '=', '\\', '+', '\\', '<', '\\', '>', '#',
'\\', ';', '\\', '\\', '\\', '"', '\\',
                 'C', '3', '\\', 'A', '9' } );
         assertEquals( "a=\\,\\=\\+\\<\\>#\\;\\\\\\\"\\C3\\A9", new Rdn( rdn ).getNormName()
);
     }

Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DnSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DnSyntaxCheckerTest.java?rev=1292077&r1=1292076&r2=1292077&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DnSyntaxCheckerTest.java
(original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/DnSyntaxCheckerTest.java
Tue Feb 21 23:37:26 2012
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.shared.ldap.model.schema.syntaxes;
 
@@ -83,6 +83,6 @@ public class DnSyntaxCheckerTest
         assertTrue( checker.isValidSyntax( "a = b" ) );
         assertTrue( checker.isValidSyntax( "a=b + c=d" ) );
         assertTrue( checker.isValidSyntax( "a=b,c=d" ) );
-        assertTrue( checker.isValidSyntax( "a=b\\,c = d, e=f" ) );
+        assertTrue( checker.isValidSyntax( "a=b\\,c \\= d, e=f" ) );
     }
 }

Modified: directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/NameAndOptionalUIDSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/NameAndOptionalUIDSyntaxCheckerTest.java?rev=1292077&r1=1292076&r2=1292077&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/NameAndOptionalUIDSyntaxCheckerTest.java
(original)
+++ directory/shared/trunk/ldap/model/src/test/java/org/apache/directory/shared/ldap/model/schema/syntaxes/NameAndOptionalUIDSyntaxCheckerTest.java
Tue Feb 21 23:37:26 2012
@@ -6,16 +6,16 @@
  *  to you under the Apache License, Version 2.0 (the
  *  "License"); you may not use this file except in compliance
  *  with the License.  You may obtain a copy of the License at
- *  
+ * 
  *    http://www.apache.org/licenses/LICENSE-2.0
- *  
+ * 
  *  Unless required by applicable law or agreed to in writing,
  *  software distributed under the License is distributed on an
  *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  *  KIND, either express or implied.  See the License for the
  *  specific language governing permissions and limitations
- *  under the License. 
- *  
+ *  under the License.
+ * 
  */
 package org.apache.directory.shared.ldap.model.schema.syntaxes;
 
@@ -93,7 +93,7 @@ public class NameAndOptionalUIDSyntaxChe
         assertTrue( checker.isValidSyntax( "a = b" ) );
         assertTrue( checker.isValidSyntax( "a=b + c=d" ) );
         assertTrue( checker.isValidSyntax( "a=b,c=d" ) );
-        assertTrue( checker.isValidSyntax( "a=b\\,c = d, e=f" ) );
+        assertTrue( checker.isValidSyntax( "a=b\\,c \\= d, e=f" ) );
     }
 
 
@@ -104,6 +104,6 @@ public class NameAndOptionalUIDSyntaxChe
         assertTrue( checker.isValidSyntax( "a = b#'1010'B" ) );
         assertTrue( checker.isValidSyntax( "a=b + c=d#'1010'B" ) );
         assertTrue( checker.isValidSyntax( "a=b,c=d#'1010'B" ) );
-        assertTrue( checker.isValidSyntax( "a=b\\,c = d, e=f#'1010'B" ) );
+        assertTrue( checker.isValidSyntax( "a=b\\,c \\= d, e=f#'1010'B" ) );
     }
 }



Mime
View raw message