directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r960948 - /directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterParserTest.java
Date Tue, 06 Jul 2010 17:25:29 GMT
Author: elecharny
Date: Tue Jul  6 17:25:29 2010
New Revision: 960948

URL: http://svn.apache.org/viewvc?rev=960948&view=rev
Log:
Test that we can have extra chars at the end of the filter

Modified:
    directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterParserTest.java

Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterParserTest.java?rev=960948&r1=960947&r2=960948&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterParserTest.java
(original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterParserTest.java
Tue Jul  6 17:25:29 2010
@@ -1053,4 +1053,19 @@ public class FilterParserTest
         String str = "(objectguid=\\29\\4C\\04\\B5\\D4\\ED\\38\\46\\87\\EE\\77\\58\\5C\\32\\AD\\91)";
         FilterParser.parse( str );
     }
+
+
+    @Test
+    public void testAndFilterFollowed() throws ParseException
+    {
+        String str = "(&(ou~=people)(age>=30))} some more text";
+        BranchNode node = ( BranchNode ) FilterParser.parse( str );
+        assertEquals( 2, node.getChildren().size() );
+        assertTrue( node instanceof AndNode );
+        String str2 = node.toString();
+        assertTrue( str.startsWith( str2 ) );
+        assertEquals( "(&(ou~=people)(age>=30))", str2 );
+    }
+
+    
 }



Mime
View raw message