directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r798875 - in /directory: apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java
Date Wed, 29 Jul 2009 12:33:51 GMT
Author: elecharny
Date: Wed Jul 29 12:33:51 2009
New Revision: 798875

URL: http://svn.apache.org/viewvc?rev=798875&view=rev
Log:
o Applied Norval's patch for DIRSERVER-1391
o Added a test to demonstrate the pb

Modified:
    directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java
    directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java

Modified: directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java?rev=798875&r1=798874&r2=798875&view=diff
==============================================================================
--- directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java
(original)
+++ directory/apacheds/trunk/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java
Wed Jul 29 12:33:51 2009
@@ -170,7 +170,9 @@
     "objectClass: person\n" +
     "objectClass: top\n" +
     "cn: Kim Wilde\n" +
-    "sn: Wilde\n\n"
+    "sn: Wilde\n" +
+    "description: an American singer-songwriter+sexy blond\n\n"
+    
     }
 )
 public class SearchIT 
@@ -1716,4 +1718,22 @@
            asyncCnx.disconnect();
         }
     }
+
+
+    @Test
+    public void testSearchSubstringWithPlus() throws Exception
+    {
+        LdapContext ctx = getWiredContext( ldapServer );
+        SearchControls controls = new SearchControls();
+        controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
+        controls.setTimeLimit( 10 );
+        
+        NamingEnumeration<SearchResult> result = ctx.search( "ou=system", "(description=*+*)",
controls );
+        
+        assertTrue( result.hasMore() );
+        
+        SearchResult entry = result.next();
+
+        assertEquals( "Kim Wilde", entry.getAttributes().get( "cn" ).get() );
+    }
 }

Modified: directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java?rev=798875&r1=798874&r2=798875&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java
(original)
+++ directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java
Wed Jul 29 12:33:51 2009
@@ -197,7 +197,7 @@
             true,  true,  true,  true,  true,  true,  true,  true,
             true,  true,  true,  true,  true,  true,  true,  true,
             true,  true,  true,  true,  true,  true,  true,  true,
-            false, false, false, false, true,  true,  true,  true, // '(', ')', '*'
+            false, false, false, true,  true,  true,  true,  true, // '(', ')', '*'
             true,  true,  true,  true,  true,  true,  true,  true, 
             true,  true,  true,  true,  true,  true,  true,  true,
             true,  true,  true,  true,  true,  true,  true,  true,



Mime
View raw message