• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#*
2
3@test array.vm
4
5This template is used for Velocity regression testing.
6If you alter this template make sure you change the
7corresponding comparison file so that the regression
8test doesn't fail incorrectly.
9
10*#
11
12#set( $foo = [$this, $that, $woog.Bar, [$this, "this"] ])
13
14$provider.concat(["a", "b", "c"])
15
16#set($foo = "a")
17$provider.objConcat( [1..2] )
18$provider.objConcat( ["a","b"] )
19$provider.objConcat( [1..2 ] )
20$provider.objConcat( [$foo] )
21$provider.objConcat( [ $foo] )
22$provider.objConcat( [$foo ] )
23
24#macro( showme $array )
25 #foreach( $i in $array )
26   > $i <#end
27
28#end
29
30#set($woog = "a")
31#set($floog = "b")
32#showme( [ $woog] )
33#showme( [ $woog,$floog] )
34#showme( [1..2])
35#showme( [1 ..2 ])
36
37##  and more....
38
39$p.m( [ $A.g(1), $title ])
40$pp.messageFormat( [ $Abc.get($sti), $title, $ti, $sti, 'bodytext' ], $subtopicTemplate)
41#set ($args = [ $pp.nQuestions, $pass, $units ] )
42
43## expression in index
44
45#set($arr = [ 0, 1, 2, 3 ])
46#set($index = 1)
47
48$arr[$index + $index * 2]
49