geirm 01/06/29 16:39:57
Modified: test/templates array.vm
test/templates/compare array.cmp
Log:
More tests for ArrayList-creating syntactical constructs. We didn't have
a good set, and this also tests for arg to directives (VM) and methods.
Revision Changes Path
1.3 +22 -3 jakarta-velocity/test/templates/array.vm
Index: array.vm
===================================================================
RCS file: /home/cvs/jakarta-velocity/test/templates/array.vm,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- array.vm 2000/10/23 21:18:27 1.2
+++ array.vm 2001/06/29 23:39:55 1.3
@@ -9,8 +9,27 @@
*#
-##set $foo = [$this, $that, $foo.Bar, [$this, "this"] ]
+#set( $foo = [$this, $that, $woog.Bar, [$this, "this"] ])
-##$provider.concat(["a", "b", "c"])
+$provider.concat(["a", "b", "c"])
-this is some text.
+#set($foo = "a")
+$provider.objConcat( [1..2] )
+$provider.objConcat( ["a","b"] )
+$provider.objConcat( [1..2 ] )
+$provider.objConcat( [$foo] )
+$provider.objConcat( [ $foo] )
+$provider.objConcat( [$foo ] )
+
+#macro( showme $array )
+ #foreach( $i in $array )
+ > $i <#end
+
+#end
+
+#set($woog = "a")
+#set($floog = "b")
+#showme( [ $woog] )
+#showme( [ $woog,$floog] )
+#showme( [1..2])
+#showme( [1 ..2 ])
1.2 +13 -1 jakarta-velocity/test/templates/compare/array.cmp
Index: array.cmp
===================================================================
RCS file: /home/cvs/jakarta-velocity/test/templates/compare/array.cmp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- array.cmp 2000/10/24 02:02:41 1.1
+++ array.cmp 2001/06/29 23:39:56 1.2
@@ -1,5 +1,17 @@
+a b c
-this is some text.
+1 2
+a b
+1 2
+a
+a
+a
+
+
+ > a <
+ > a < > b <
+ > 1 < > 2 <
+ > 1 < > 2 <