aboutsummaryrefslogtreecommitdiff
path: root/velocity-engine-core/src/test/resources/templates/array.vm
blob: 15362e6dcd9c6ff8779c7bde725bae6a1a62a4bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#*

@test array.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.

*#

#set( $foo = [$this, $that, $woog.Bar, [$this, "this"] ])

$provider.concat(["a", "b", "c"])

#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 ])

##  and more....

$p.m( [ $A.g(1), $title ])
$pp.messageFormat( [ $Abc.get($sti), $title, $ti, $sti, 'bodytext' ], $subtopicTemplate)
#set ($args = [ $pp.nQuestions, $pass, $units ] )

## expression in index

#set($arr = [ 0, 1, 2, 3 ])
#set($index = 1)

$arr[$index + $index * 2]