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...@apache.org on 2001/08/11 21:05:34 UTC
cvs commit: jakarta-velocity/test/templates/compare foreach-introspect.cmp
geirm 01/08/11 12:05:34
Modified: test/templates templates.properties
Added: test/templates foreach-introspect.vm
test/templates/compare foreach-introspect.cmp
Log:
Added new test, foreach-introspect.vm that tests
#set($array = [1..10])
#set($it = $array.iterator())
#foreach($num in [21..30])
$num $it.next()
#end
This was a problem before, as the iterator was an
internal class, so there were problems. No more.
Revision Changes Path
1.2 +1 -0 jakarta-velocity/test/templates/templates.properties
Index: templates.properties
===================================================================
RCS file: /home/cvs/jakarta-velocity/test/templates/templates.properties,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- templates.properties 2001/03/12 01:01:47 1.1
+++ templates.properties 2001/08/11 19:05:34 1.2
@@ -37,3 +37,4 @@
test.template.35 = get
test.template.36 = velocimacro2
test.template.37 = foreach-type
+test.template.38 = foreach-introspect
1.1 jakarta-velocity/test/templates/foreach-introspect.vm
Index: foreach-introspect.vm
===================================================================
##
## tests a difficult introspection problem -
## the iterator is a private inner class
##
#set($array = [1..10])
#set($it = $array.iterator())
#foreach($num in [21..30])
$num $it.next()
#end
1.1 jakarta-velocity/test/templates/compare/foreach-introspect.cmp
Index: foreach-introspect.cmp
===================================================================
21 1
22 2
23 3
24 4
25 5
26 6
27 7
28 8
29 9
30 10