geirm 00/10/31 08:17:49
Added: test/templates pedantic.vm
Log:
New test template, exercises the whitespace handling and other goodies for accurate
output generation.
Revision Changes Path
1.1 jakarta-velocity/test/templates/pedantic.vm
Index: pedantic.vm
===================================================================
#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>
--