directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r675290 - /directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/filter/FilterParserTest.java
Date Wed, 09 Jul 2008 18:29:50 GMT
Author: elecharny
Date: Wed Jul  9 11:29:49 2008
New Revision: 675290

URL: http://svn.apache.org/viewvc?rev=675290&view=rev
Log:
Added a test to check if a # in a value is correctly handled in a 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=675290&r1=675289&r2=675290&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
Wed Jul  9 11:29:49 2008
@@ -642,7 +642,21 @@
         assertTrue( node instanceof EqualityNode );
     }
 
-    
+
+    /**
+     * test a filter with a # in value
+     */
+    @SuppressWarnings("unchecked")
+    @Test
+    public void testEqualsFilterWithPoundInValue() throws ParseException
+    {
+        SimpleNode node = ( SimpleNode ) FilterParser.parse( "(uid=#f1)" );
+        assertEquals( "uid", node.getAttribute() );
+        assertEquals( "#f1", node.getValue().get() );
+        assertTrue( node instanceof EqualityNode );
+    }
+
+
     /*
     @Test
     public void testPerf() throws ParseException



Mime
View raw message