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/21 05:44:22 UTC
cvs commit: jakarta-velocity/test/templates/compare velocimacro.cmp
geirm 00/12/20 20:44:21
Modified: test/templates VM_global_library.vm velocimacro.vm
test/templates/compare velocimacro.cmp
Log:
Added tests for boolean args to VMs.
Revision Changes Path
1.3 +9 -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.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- VM_global_library.vm 2000/12/10 05:00:18 1.2
+++ VM_global_library.vm 2000/12/21 04:44:20 1.3
@@ -15,4 +15,13 @@
#recurse( $count )
#end
+#macro( testbool $b )
+ #if($b)
+ arg true
+ #end
+ #if( ! $b )
+ arg false
+ #end
+#end
+
1.4 +5 -0 jakarta-velocity/test/templates/velocimacro.vm
Index: velocimacro.vm
===================================================================
RCS file: /home/cvs/jakarta-velocity/test/templates/velocimacro.vm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- velocimacro.vm 2000/11/26 19:38:58 1.3
+++ velocimacro.vm 2000/12/21 04:44:20 1.4
@@ -66,4 +66,9 @@
String literals should work as you expect :
#showarg( "stringliteral")
+
+Test boolean args :
+
+#testbool(true)
+#testbool(false)
- Another fine Velocity Production -
1.4 +6 -1 jakarta-velocity/test/templates/compare/velocimacro.cmp
Index: velocimacro.cmp
===================================================================
RCS file: /home/cvs/jakarta-velocity/test/templates/compare/velocimacro.cmp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- velocimacro.cmp 2000/11/26 19:38:59 1.3
+++ velocimacro.cmp 2000/12/21 04:44:21 1.4
@@ -41,4 +41,9 @@
String literals should work as you expect :
Arg :>stringliteral<
-- Another fine Velocity Production -
+
+Test boolean args :
+
+ arg true
+ arg false
+ - Another fine Velocity Production -