This is an automated email from the ASF dual-hosted git repository.
cbrisson pushed a commit to branch bugfix/velocity-940
in repository https://gitbox.apache.org/repos/asf/velocity-engine.git
The following commit(s) were added to refs/heads/bugfix/velocity-940 by this
push:
new ebf657e9 Add some more tests
ebf657e9 is described below
commit ebf657e9357a6add226ad50c14b3348960ecd423
Author: Claude Brisson <[email protected]>
AuthorDate: Sun Mar 26 15:40:47 2023 +0200
Add some more tests
---
.../org/apache/velocity/test/issues/Velocity940TestCase.java | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git
a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity940TestCase.java
b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity940TestCase.java
index 45a318a0..47e8c3e0 100644
---
a/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity940TestCase.java
+++
b/velocity-engine-core/src/test/java/org/apache/velocity/test/issues/Velocity940TestCase.java
@@ -16,9 +16,21 @@ public class Velocity940TestCase extends BaseTestCase
assertEvalEquals("Something First Something Second ", "#macro(test
$label)Something $!label
$!bodyContent#{end}#@test('First')#test('Second')#end");
}
+ @Test
public void testBlockInsideBlock()
{
assertEvalEquals("Something First Something Second Somewhere",
"#macro(test $label)Something $!label
$!bodyContent#{end}#@test('First')#@test('Second')Somewhere#end#end");
}
+ @Test
+ public void testBlockInsideBlockBodyRestored()
+ {
+ assertEvalEquals("Something First Something Second Somewhere After
Somewhere After Something Second Somewhere After Somewhere", "#macro(test
$label)Something $!label $!bodyContent After
$!bodyContent#{end}#@test('First')#@test('Second')Somewhere#end#end");
+ }
+
+ @Test
+ public void testBlockInsideBody()
+ {
+ assertEvalEquals("Something First Somehow Inside With Outside Someone
Objectively Hidden", "#macro(test2 $label)Somehow $!label With $!bodyContent
Someone#end#macro(test $label)Something $!label #@test2('Inside')Outside#end
Objectively $!bodyContent#end#@test('First')Hidden#end");
+ }
}