directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r239929 - /directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/name/DnParserTest.java
Date Wed, 24 Aug 2005 21:18:25 GMT
Author: akarasulu
Date: Wed Aug 24 14:18:20 2005
New Revision: 239929

URL: http://svn.apache.org/viewcvs?rev=239929&view=rev
Log:
Added a test case to verify if the DnParser is correctly parsing and preserving
whitespace after an escaped ',' in a value of the DN.  This was added to try 
to reproduce the bug in DIREVE-179 here:

	http://issues.apache.org/jira/browse/DIREVE-179 

Modified:
    directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/name/DnParserTest.java

Modified: directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/name/DnParserTest.java
URL: http://svn.apache.org/viewcvs/directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/name/DnParserTest.java?rev=239929&r1=239928&r2=239929&view=diff
==============================================================================
--- directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/name/DnParserTest.java
(original)
+++ directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/name/DnParserTest.java
Wed Aug 24 14:18:20 2005
@@ -245,4 +245,21 @@
             assertNotNull(e);
         }
     }
+
+
+    /**
+     * Tests to see if inner whitespace is preserved after an escaped ',' in
+     * a value of a name component.  This test was added to try to reproduce
+     * the bug encountered in DIREVE-179 <a href="http://issues.apache.org/jira/browse/DIREVE-179">
+     * here</a>. 
+     *
+     * @throws NamingException if anything goes wrong on parse()
+     */
+    public final void testPreserveSpaceAfterEscape() throws NamingException
+    {
+        DnParser parser = new DnParser();
+        String input = "ou=some test\\,  something else";
+        String result = parser.parse( input ).toString();
+        assertEquals( input, result );
+    }
 }  // end class DnParserTest



Mime
View raw message