jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r505288 - /jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/FulltextQueryTest.java
Date Fri, 09 Feb 2007 13:45:52 GMT
Author: mreutegg
Date: Fri Feb  9 05:45:52 2007
New Revision: 505288

URL: http://svn.apache.org/viewvc?view=rev&rev=505288
Log:
JCR-739: Predefined entity references are not decoded in string literal
- added test case

Modified:
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/FulltextQueryTest.java

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/FulltextQueryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/FulltextQueryTest.java?view=diff&rev=505288&r1=505287&r2=505288
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/FulltextQueryTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/FulltextQueryTest.java
Fri Feb  9 05:45:52 2007
@@ -16,6 +16,8 @@
  */
 package org.apache.jackrabbit.core.query;
 
+import org.apache.jackrabbit.util.Text;
+
 import javax.jcr.Node;
 import javax.jcr.RepositoryException;
 import javax.jcr.query.Query;
@@ -253,6 +255,11 @@
 
     }
 
+    public void testPredefinedEntityReference() throws RepositoryException {
+        String content = "Max&Moritz";
+
+        executeContainsQuery("max&moritz", content, true);
+    }
 
     /**
      * Executes a query and checks if the query matched the test node.
@@ -273,7 +280,7 @@
 
         StringBuffer stmt = new StringBuffer();
         stmt.append("/jcr:root").append(testRoot).append("/*");
-        stmt.append("[jcr:contains(., '").append(statement);
+        stmt.append("[jcr:contains(., '").append(Text.encodeIllegalXMLCharacters(statement));
         stmt.append("')]");
 
         Query q = superuser.getWorkspace().getQueryManager().createQuery(stmt.toString(),
Query.XPATH);



Mime
View raw message