You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2005/08/24 23:18:25 UTC
svn commit: r239929 -
/directory/shared/ldap/trunk/common/src/test/org/apache/ldap/common/name/DnParserTest.java
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