directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r487402 - /directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
Date Fri, 15 Dec 2006 00:04:19 GMT
Author: elecharny
Date: Thu Dec 14 16:04:19 2006
New Revision: 487402

URL: http://svn.apache.org/viewvc?view=rev&rev=487402
Log:
Added a test for a dn ending with a coma

Modified:
    directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java

Modified: directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
URL: http://svn.apache.org/viewvc/directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java?view=diff&rev=487402&r1=487401&r2=487402
==============================================================================
--- directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
(original)
+++ directory/trunks/shared/ldap/src/test/java/org/apache/directory/shared/ldap/name/LdapDNTest.java
Thu Dec 14 16:04:19 2006
@@ -334,7 +334,6 @@
        }
        catch ( InvalidNameException ine )
        {
-
            assertFalse( LdapDN.isValid( "a = #AABBCCDD3" ) );
            assertTrue( true );
        }
@@ -362,6 +361,25 @@
        assertTrue( LdapDN.isValid( "a = \\\" quoted value \\\"" ) );
        assertEquals( "a=\\\" quoted value \\\"", dn.toString() );
        assertEquals( "a = \\\" quoted value \\\"", dn.getUpName() );
+   }
+
+   /**
+    * test a simple DN with a comma at the end
+    */
+   public void testLdapDNComaAtEnd() throws InvalidNameException
+   {
+       assertFalse( LdapDN.isValid( "a = b,"  ) );
+       assertFalse( LdapDN.isValid( "a = b, "  ) );
+       
+       try
+       {
+           new LdapDN( "a = b," );
+           fail();
+       }
+       catch ( InvalidNameException ine )
+       {
+           assertTrue( true );
+       }
    }
 
 



Mime
View raw message