This is an automated email from the ASF dual-hosted git repository.

daim pushed a commit to branch DetailedGC/OAK-10199
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git

commit 7358d950df5662f7dd419017dabf2cc89239e33d
Author: Manfred Baedke <[email protected]>
AuthorDate: Wed Jan 24 14:25:39 2024 +0100

    OAK-10596: Improve the test coverage of o.a.j.o.namepath.JcrPathParser
    
    Improved test cases.
---
 .../jackrabbit/oak/namepath/PathParserTest.java    | 37 ++++++++++++++++++----
 1 file changed, 31 insertions(+), 6 deletions(-)

diff --git 
a/oak-core-spi/src/test/java/org/apache/jackrabbit/oak/namepath/PathParserTest.java
 
b/oak-core-spi/src/test/java/org/apache/jackrabbit/oak/namepath/PathParserTest.java
index 3a3cc0bdda..4bbe7f7077 100755
--- 
a/oak-core-spi/src/test/java/org/apache/jackrabbit/oak/namepath/PathParserTest.java
+++ 
b/oak-core-spi/src/test/java/org/apache/jackrabbit/oak/namepath/PathParserTest.java
@@ -290,12 +290,6 @@ public class PathParserTest {
         );
         verifyResult(path, listener, false);
 
-        path = "{[}";
-        listener = new TestListener(
-                CALLBACKRESULT_ERROR(errorCharacterNotAllowedInName(path,'['))
-        );
-        verifyResult(path, listener, false);
-
         path = "a[[";
         listener = new TestListener(
                 //TODO OAK-10616
@@ -562,6 +556,28 @@ public class PathParserTest {
                 CALLBACKRESULT_NAME("a:}{", 1)
         );
         verifyResult(path, listener, true);
+
+        path = "{a}";
+        listener = new TestListener(
+                CALLBACKRESULT_NAME("{a}")
+        );
+        verifyResult(path, listener, true);
+
+        path = "{[}";
+        listener = new TestListener(
+                //TODO OAK-10616
+                //the error message is could be improved (Empty local name is 
not allowed).
+                CALLBACKRESULT_ERROR("'{[}' is not a valid path. '[' not 
allowed in name.")
+        );
+        verifyResult(path, listener, false);
+
+        path = "{[}/a";
+        listener = new TestListener(
+                //TODO OAK-10616
+                //the error message is could be improved (Empty local name is 
not allowed).
+                CALLBACKRESULT_ERROR("'{[}/a' is not a valid path. '[' not 
allowed in name.")
+        );
+        verifyResult(path, listener, false);
     }
 
     @Test
@@ -589,6 +605,15 @@ public class PathParserTest {
         );
         verifyResult(path, listener, false);
 
+        path = "/a:/b";
+        listener = new TestListener(
+                CALLBACKRESULT_ROOT,
+                //TODO OAK-10616
+                //the error message is could be improved (Empty local name is 
not allowed).
+                CALLBACKRESULT_ERROR("'/a:/b' is not a valid path. '/' not 
allowed in name.")
+        );
+        verifyResult(path, listener, false);
+
         path = "/a:b:c";
         listener = new TestListener(
                 CALLBACKRESULT_ROOT,

Reply via email to