diff --git a/cms-content/src/test/java/com/condation/cms/content/shortcodes/TagParserTest.java b/cms-content/src/test/java/com/condation/cms/content/shortcodes/TagParserTest.java
index 3911dcf3..80ba9abf 100644
--- a/cms-content/src/test/java/com/condation/cms/content/shortcodes/TagParserTest.java
+++ b/cms-content/src/test/java/com/condation/cms/content/shortcodes/TagParserTest.java
@@ -60,6 +60,13 @@ void setup() {
return "message: " + params.get("message");
});
+ tagMap.put("parent", params -> {
+ return "
%s
".formatted((String)params.get("_content"));
+ });
+ tagMap.put("nested", params -> {
+ return "nested";
+ });
+
this.tagParser = new TagParser(new JexlBuilder().create());
}
@@ -154,20 +161,20 @@ public void multiline () {
String result = tagParser.parse(content, tagMap);
- System.out.println("-" + result + "-");
+ Assertions.assertThat(result).isEqualToIgnoringWhitespace("This is a multiline shortcode!");
}
@Test
public void nested () {
String content = """
- [[content]]
+ [[parent]]
[[nested /]]
- [[/content]]
+ [[/parent]]
""";
var tags = tagParser.findTags(content, tagMap);
Assertions.assertThat(tags.size()).isEqualTo(1);
String result = tagParser.parse(content, tagMap);
- System.out.println("-" + result + "-");
+ Assertions.assertThat(result).isEqualToIgnoringWhitespace("nested
");
}
}