You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@velocity.apache.org by nb...@apache.org on 2010/09/01 20:28:40 UTC

svn commit: r991639 - /velocity/engine/branches/2.0_Exp/src/test/org/apache/velocity/test/BlockMacroTestCase.java

Author: nbubna
Date: Wed Sep  1 18:28:40 2010
New Revision: 991639

URL: http://svn.apache.org/viewvc?rev=991639&view=rev
Log:
extra test i had laying around, might as well include

Modified:
    velocity/engine/branches/2.0_Exp/src/test/org/apache/velocity/test/BlockMacroTestCase.java

Modified: velocity/engine/branches/2.0_Exp/src/test/org/apache/velocity/test/BlockMacroTestCase.java
URL: http://svn.apache.org/viewvc/velocity/engine/branches/2.0_Exp/src/test/org/apache/velocity/test/BlockMacroTestCase.java?rev=991639&r1=991638&r2=991639&view=diff
==============================================================================
--- velocity/engine/branches/2.0_Exp/src/test/org/apache/velocity/test/BlockMacroTestCase.java (original)
+++ velocity/engine/branches/2.0_Exp/src/test/org/apache/velocity/test/BlockMacroTestCase.java Wed Sep  1 18:28:40 2010
@@ -128,5 +128,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");
+    }
 }