geirm 01/02/15 04:34:28
Modified: test test.properties
Added: test/templates foreach-type.vm
test/templates/compare foreach-type.cmp
Log:
Added formal test template for the collections supported by #foreach()
Revision Changes Path
1.24 +1 -0 jakarta-velocity/test/test.properties
Index: test.properties
===================================================================
RCS file: /home/cvs/jakarta-velocity/test/test.properties,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- test.properties 2001/01/29 04:28:35 1.23
+++ test.properties 2001/02/15 12:34:22 1.24
@@ -36,3 +36,4 @@
test.template.34 = range
test.template.35 = get
test.template.36 = velocimacro2
+test.template.37 = foreach-type
1.1 jakarta-velocity/test/templates/foreach-type.vm
Index: foreach-type.vm
===================================================================
#*
@test foreach-type.vm
This template is used for Velocity regression testing.
If you alter this template make sure you change the
corresponding comparison file so that the regression
test doesn't fail incorrectly.
*#
Using a Object []
#foreach( $i in $obarr)
$i
#end
Using a Map
#foreach( $i in $map )
$i
#end
Using a Collection
#foreach($i in $collection )
$i
#end
Using an Iterator
#foreach($i in $iterator )
$i
#end
1.1 jakarta-velocity/test/templates/compare/foreach-type.cmp
Index: foreach-type.cmp
===================================================================
Using a Object []
a
b
c
d
Using a Map
this is from a hashtable!
this is from a hashtable too!
Using a Collection
string1
string2
Using an Iterator
string1
string2