File: eval1.vm

package info (click to toggle)
velocity 1.7-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 5,844 kB
  • ctags: 5,363
  • sloc: java: 41,235; xml: 15,001; sh: 192; sql: 18; makefile: 5
file content (20 lines) | stat: -rw-r--r-- 459 bytes parent folder | download | duplicates (6)
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 doesn't 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 hasn't changed
test1: $test1