aboutsummaryrefslogtreecommitdiff
path: root/velocity-engine-core/src/test/resources/evaluate/eval1.vm
blob: 889b0e026803ad326c5c7959106f9c825f75a344 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
## Testing the evaluate directive

#evaluate("basic string")

#set($test1 = "zz")
#set($test2 = '$test1')

#evaluate("embedded reference $test2")

#evaluate($test2)

## Now check that #evaluate does change context
## Need to use single quote to surround #set to prevent premature evaluation

#set($teststring = "reference $test2 changes to" +
          '#set($test1 = "xx") $test1')
#evaluate($teststring)

## Check that test1 has changed
test1: $test1