You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by re...@apache.org on 2026/08/12 11:46:41 UTC
(sling-org-apache-sling-resourceresolver) branch SLING-13301 updated: SLING-13301: test syntax variants
This is an automated email from the ASF dual-hosted git repository.
reschke pushed a commit to branch SLING-13301
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-resourceresolver.git
The following commit(s) were added to refs/heads/SLING-13301 by this push:
new 87c5f0d2 SLING-13301: test syntax variants
87c5f0d2 is described below
commit 87c5f0d271bb6a7d90e4348df47bcb53da8a9856
Author: Julian Reschke <re...@apache.org>
AuthorDate: Wed Aug 12 12:46:30 2026 +0100
SLING-13301: test syntax variants
---
.../impl/mapping/VanityPathMapEntriesTest.java | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/test/java/org/apache/sling/resourceresolver/impl/mapping/VanityPathMapEntriesTest.java b/src/test/java/org/apache/sling/resourceresolver/impl/mapping/VanityPathMapEntriesTest.java
index ff683aed..87298f52 100644
--- a/src/test/java/org/apache/sling/resourceresolver/impl/mapping/VanityPathMapEntriesTest.java
+++ b/src/test/java/org/apache/sling/resourceresolver/impl/mapping/VanityPathMapEntriesTest.java
@@ -271,21 +271,21 @@ public class VanityPathMapEntriesTest extends AbstractMappingMapEntriesTest {
@Test
public void test_syntax_variants() {
// absolute path
- internal_test_syntax_variants("/x", "/x");
+ assertPathResolvesTo("/x", "/x");
// relative path
- internal_test_syntax_variants("x", "/x");
+ assertPathResolvesTo("x", "/x");
// multi-segment absolute path
- internal_test_syntax_variants("/x/y", "/x/y");
+ assertPathResolvesTo("/x/y", "/x/y");
// multi-segment relative path
- internal_test_syntax_variants("x/y", "/x/y");
+ assertPathResolvesTo("x/y", "/x/y");
// multi-segment absolute path starting with "//"
- internal_test_syntax_variants("//x//y", "//x//y");
+ assertPathResolvesTo("//x//y", "//x//y");
// multi-segment absolute path starting with "/.."
- internal_test_syntax_variants("/../x", "/../x");
+ assertPathResolvesTo("/../x", "/../x");
// blank path
- internal_test_syntax_variants(" ", null);
+ assertPathResolvesTo(" ", null);
// empty path
- internal_test_syntax_variants("", null);
+ assertPathResolvesTo("", null);
}
private void assertPathResolvesTo(String vanityPath, String expectedPath) {
@@ -299,12 +299,12 @@ public class VanityPathMapEntriesTest extends AbstractMappingMapEntriesTest {
Map<String, List<String>> vanityMap = mapEntries.getVanityPathMappings();
assertNotNull("vm should not be null", vanityMap);
- if (expectation == null) {
+ if (expectedPath == null) {
assertEquals("size of vm should be 0", 0, vanityMap.size());
} else {
assertEquals("size of vm should be 1", 1, vanityMap.size());
assertNotNull("vp should be present in vm, got " + vanityMap, vanityMap.get(path));
- assertEquals(expectation, vanityMap.get(path).get(0));
+ assertEquals(expectedPath, vanityMap.get(path).get(0));
}
}