velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nbu...@apache.org
Subject svn commit: r939793 - /velocity/engine/trunk/src/test/org/apache/velocity/test/BlockMacroTestCase.java
Date Fri, 30 Apr 2010 19:41:07 GMT
Author: nbubna
Date: Fri Apr 30 19:41:07 2010
New Revision: 939793

URL: http://svn.apache.org/viewvc?rev=939793&view=rev
Log:
add test of example i just gave to bluejoe2008, because it's interesting

Modified:
    velocity/engine/trunk/src/test/org/apache/velocity/test/BlockMacroTestCase.java

Modified: velocity/engine/trunk/src/test/org/apache/velocity/test/BlockMacroTestCase.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/src/test/org/apache/velocity/test/BlockMacroTestCase.java?rev=939793&r1=939792&r2=939793&view=diff
==============================================================================
--- velocity/engine/trunk/src/test/org/apache/velocity/test/BlockMacroTestCase.java (original)
+++ velocity/engine/trunk/src/test/org/apache/velocity/test/BlockMacroTestCase.java Fri Apr
30 19:41:07 2010
@@ -114,5 +114,15 @@ public class BlockMacroTestCase extends 
                           "#@foo()call:$bodyContent#end";
         assertEvalEquals("start:call:call:call:$bodyContent", template);
     }
+
+    public void testBlueJoesProblem()
+    {
+        engine.setProperty("macro."+RuntimeConstants.PROVIDE_SCOPE_CONTROL, Boolean.TRUE);
+        addTemplate("a", "#macro(wrap $layout)$!macro.put($layout,$bodyContent)#parse($layout)#end"+
+                         "#@wrap('b')a#end");
+        addTemplate("b", "#@wrap('c')b$!macro.get('b')b#end");
+        addTemplate("c", "c$!macro.get('c')c");
+        assertTmplEquals("cbabc", "a");
+    }
 }
 



Mime
View raw message