directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r674900 - /directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchIT.java
Date Tue, 08 Jul 2008 17:57:24 GMT
Author: elecharny
Date: Tue Jul  8 10:57:23 2008
New Revision: 674900

URL: http://svn.apache.org/viewvc?rev=674900&view=rev
Log:
Temporarily added a commented test until we are ready to make this test pass.

Modified:
    directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchIT.java

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchIT.java?rev=674900&r1=674899&r2=674900&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchIT.java
(original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/jndi/SearchIT.java
Tue Jul  8 10:57:23 2008
@@ -1213,4 +1213,43 @@
         assertFalse( results.contains( "cn=testGroup4,ou=groups,ou=system" ) );
         assertTrue( results.contains( "cn=testGroup5,ou=groups,ou=system" ) );
     }
+
+
+    /**
+     * Search operation with a base DN with quotes
+     * Commented as it's not valid by RFC 5514
+    @Test
+    public void testSearchWithQuotesInBase() throws NamingException 
+    {
+        LdapContext sysRoot = getSystemContext( service );
+        createData( sysRoot );
+
+        SearchControls ctls = new SearchControls();
+        ctls.setSearchScope( SearchControls.OBJECT_SCOPE );
+        String filter = "(cn=Tori Amos)";
+        ctls.setReturningAttributes( new String[]
+            { "cn", "cn" } );
+
+        // Search for cn="Tori Amos" (with quotes)
+        String base = "cn=\"Tori Amos\"";
+
+        try {
+            // Check entry
+            NamingEnumeration<SearchResult> result = sysRoot.search( base, filter,
ctls );
+            assertTrue( result.hasMore() );
+            
+            while ( result.hasMore() ) 
+            {
+                SearchResult sr = result.next();
+                Attributes attrs = sr.getAttributes();
+                Attribute sn = attrs.get( "cn" );
+                assertNotNull(sn);
+                assertTrue( sn.contains( "Amos" ) );
+            }
+        } catch (Exception e) 
+        {
+            fail( e.getMessage() );
+        }
+    }
+    */
 }



Mime
View raw message