On Sun, Jun 1, 2008 at 11:11 AM, Stefan Seelmann <[EMAIL PROTECTED]> wrote: > Hi, > > In testAttributeTypeParseWithDescQuotes() of OpenLdapSchemaParserTest > (http://tinyurl.com/58nhpm) the DESC element contains two double quotes: > > ... DESC 'RFC2256: \"knowledge\" information'\n" ... > > The parser in openldap.g adds a backslash before each double quote and > this is also expected in the test: > > assertEquals( "RFC2256: \\\"knowledge\\\" information", > type.getDescription() ); > > I just wonder what's the reason for adding a backslash?
Because otherwise, the two strings wont be equal :) The first \\ in the assert will be transformed into a \ internally. The following \" is transformed to a " This result to a \" internally, to be compared with the original DESC, containing \". -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com
