4 More interesting cases...
6 This template is used for Velocity regression testing.
7 If you alter this template make sure you change the
8 corresponding comparison file so that the regression
9 test doesn't fail incorrectly.
14 These are not in the context, so they should render as they are here (schmoo).
23 Now put $foo in the context :
29 As we increase the number of \'s, we alternate renderings :
36 --- Pluggable Directives ----
38 We are doing an \#include("test.txt"), starting with 0 '\' preceeding :
42 \\#include("test.txt")
43 \\\#include("test.txt")
44 \\\\#include("test.txt")
46 Now, foreach is a PD. Escape the first one, and then not the second so it
47 renders. The third and fourth examples show the single 'unpleasantry' about this. The \
48 is only an escape when 'touching' VTL, otherwise, it's just schmoo.
52 \\#foreach($a in $stringarray) $a \\#end
54 \\#foreach($a in $stringarray) $a \ \\#end
56 \\#foreach($a in $stringarray)$a\ \\#end
59 --- Control Structures ----
61 First should be escaped...
64 This isn't. Note then that it has to render the \\ as a \ because it's stuck to the VTL
71 \\\#if(true) hi \\\#end
73 \\\\#if(true) hi \\\\#end
107 ## testing combinations like #$foo
113 #set($foo1 = "C0C0C0")
120 ## and wacky stuff that are not references, but
121 ## because of the MORE tokens, get screwed up
123 $(QUERY_STRING{forumid})
124 \$(QUERY_STRING{forumid})
125 \\$(QUERY_STRING{forumid})