jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1540991 - /jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/namepath/NamePathMapperImplTest.java
Date Tue, 12 Nov 2013 10:06:18 GMT
Author: mduerig
Date: Tue Nov 12 10:06:17 2013
New Revision: 1540991

URL: http://svn.apache.org/r1540991
Log:
OAK-1168: Invalid JCR paths not caught
Test case with the failing path commented out

Modified:
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/namepath/NamePathMapperImplTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/namepath/NamePathMapperImplTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/namepath/NamePathMapperImplTest.java?rev=1540991&r1=1540990&r2=1540991&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/namepath/NamePathMapperImplTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/namepath/NamePathMapperImplTest.java
Tue Nov 12 10:06:17 2013
@@ -22,13 +22,13 @@ import static org.junit.Assert.assertNul
 import static org.junit.Assert.fail;
 
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 
 import javax.jcr.RepositoryException;
 
 import com.google.common.collect.ImmutableMap;
-
 import org.apache.jackrabbit.oak.TestGlobalNameMapper;
 import org.apache.jackrabbit.oak.TestNameMapper;
 import org.apache.jackrabbit.oak.plugins.identifier.IdentifierManager;
@@ -167,9 +167,20 @@ public class NamePathMapperImplTest {
                 "/..",
                 "/foo/../..",
                 "foo::bar",
-                "foo:bar:baz" };
-        for (String path : paths) {
-            assertNull(npMapper.getOakPath(path));
+                "foo:bar:baz",
+//                "foo:bar]baz",  FIXME OAK-1168
+        };
+
+        NamePathMapper[] mappers = {
+                npMapper,
+                new NamePathMapperImpl(
+                        new TestNameMapper(GLOBAL, Collections.<String, String>emptyMap()))
+        };
+
+        for (NamePathMapper mapper : mappers) {
+            for (String path : paths) {
+                assertNull(path, mapper.getOakPath(path));
+            }
         }
     }
 



Mime
View raw message