Add some more tests
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 45a318a..47e8c3e 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 void testNonBlockInsideBlock()
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");
+ }
}