You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by ge...@locus.apache.org on 2000/12/10 06:00:20 UTC
cvs commit: jakarta-velocity/test/templates VM_global_library.vm
geirm 00/12/09 21:00:19
Modified: test test.properties
test/templates VM_global_library.vm
Log:
Changes to test template-local inline VM stuff and VM recursion. Added VM recursion test, and tliVM stuff in VM_global_library.vm
Revision Changes Path
1.16 +1 -0 jakarta-velocity/test/test.properties
Index: test.properties
===================================================================
RCS file: /home/cvs/jakarta-velocity/test/test.properties,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- test.properties 2000/11/28 04:29:29 1.15
+++ test.properties 2000/12/10 05:00:15 1.16
@@ -28,3 +28,4 @@
test.template.26 = velocimacro
test.template.27 = reference
test.template.28 = interpolation
+test.template.29 = vm_test1
1.2 +14 -0 jakarta-velocity/test/templates/VM_global_library.vm
Index: VM_global_library.vm
===================================================================
RCS file: /home/cvs/jakarta-velocity/test/templates/VM_global_library.vm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- VM_global_library.vm 2000/11/19 23:31:22 1.1
+++ VM_global_library.vm 2000/12/10 05:00:18 1.2
@@ -2,3 +2,17 @@
#if($a)$a#end
#end
+#macro( recurse $a )
+ global recurse $a
+ #set( $a = $a - 1)
+ #if ($a > 0)
+ #recurse( $a )
+ #end
+#end
+
+#macro( callrecurse )
+ #set( $count = 5)
+ #recurse( $count )
+#end
+
+