| #* |
| |
| @test pedantic.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 $pedantic = "pedantic" |
| |
| This is a test of the new #if($pedantic)$pedantic#end mode. |
| |
| There are a few things you can do in #if($foobar) GOOGLE! #else$pedantic#end mode. |
| |
| Like get the spacing between things #foreach($a in $stringarray)$a#end to be really, really tight. |
| |
| Further, it now binds any \n to the control structures, taking them out of the output. |
| The hope that this is What You Expect. |
| So... |
| |
| -- |
| #if ($pedantic) |
| $pedantic |
| #end |
| -- |
| |
| should come out looking like |
| |
| -- |
| pedantic |
| -- |
| |
| But pay attention to what follows the \#end statement : |
| |
| 1) First, follow with 'stuff' (not sure why you want to do this... but anway...) |
| |
| -- |
| #if ($pedantic) |
| $pedantic |
| #end woogie! |
| -- |
| |
| should be |
| |
| -- |
| pedantic |
| woogie! |
| -- |
| |
| 2) You can even just have spaces : be careful! |
| |
| -- |
| #if ($pedantic) |
| $pedantic |
| #end |
| <preceeded by a line with just 2 spaces> |
| -- |
| |
| should be |
| |
| -- |
| pedantic |
| |
| <preceeded by a line with just 2 spaces> |
| -- |
| |