jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r415779 - /jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/util/TextTest.java
Date Tue, 20 Jun 2006 19:31:29 GMT
Author: jukka
Date: Tue Jun 20 12:31:29 2006
New Revision: 415779

URL: http://svn.apache.org/viewvc?rev=415779&view=rev
Log:
Check that the escaped names are actually valid.

Modified:
    jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/util/TextTest.java

Modified: jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/util/TextTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/util/TextTest.java?rev=415779&r1=415778&r2=415779&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/util/TextTest.java (original)
+++ jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/util/TextTest.java Tue
Jun 20 12:31:29 2006
@@ -16,6 +16,9 @@
  */
 package org.apache.jackrabbit.util;
 
+import org.apache.jackrabbit.name.IllegalNameException;
+import org.apache.jackrabbit.name.QName;
+
 import junit.framework.TestCase;
 
 /**
@@ -25,6 +28,11 @@
 
     private void checkEscape(String name) {
         String escaped = Text.escapeIllegalJcrChars(name);
+        try {
+            QName.checkFormat(escaped);
+        } catch (IllegalNameException e) {
+            fail("Illegal name: " + escaped);
+        }
         assertEquals(name, Text.unescapeIllegalJcrChars(escaped));
     }
 



Mime
View raw message