5 This template is used for Velocity regression testing.
6 If you alter this template make sure you change the
7 corresponding comparison file so that the regression
8 test doesn't fail incorrectly.
11 ## inline VM : shows how a tablerow might be generated
13 #macro( tablerow $array $color )
14 #foreach( $element in $array )
15 <tr><tdi bgcolor=$color>$element</td></tr>
19 Now, use the \#quietnull example from the global library VM_global_library.vm :
20 Now, there should be nothing in the brackets : >#quietnull($nada)<
23 Where there should be something here : >#quietnull($foo)<
25 #set($arr = ["$10.24","$15.32","$12.15"])
33 Further tests. The following VMs and non-VM should be properly escaped :
39 Now try to define a new quietnull VM :
40 #macro( quietnull $a )
44 It should have been rejected, as the default is to not let inlines override existing, and there
45 should be a message in velocity.log.
46 Therefore it should still function normally :
50 We should be able to use argless VMs (and directives....)
52 Hello! I have no args!
58 And there was a bug where I wasn't getting the params right for the use-instance :
64 #showarg( $jdom.getRootElement().getChild("properties").getChild("author").getTextTrim() )
66 String literals should work as you expect :
67 #showarg( "stringliteral")
74 - Another fine Velocity Production -