Adding support for serialization / remoting.
[castle.git] / Tools / NVelocity / test / templates / compare / escape2.cmp
blob067b396f9d6e4110daab847b949cc2caaeb54621
2 --- Schmoo ---
4 These are not in the context, so they should render as they are here (schmoo).
5 $foo
6 \$foo
7 \\$foo
9 \#woogie
10 \\#woogie
11 \\\#woogie
13 Now put $foo in the context :
14 $foo = bar
15 \$foo =\bar
16 \\$foo =\\bar
18 As we increase the number of \'s, we alternate renderings :
19 bar
20 $foo
21 \bar
22 \$foo
23 \\bar
25 --- Pluggable Directives ----
27 We are doing an #include("test.txt"), starting with 0 '\' preceeding :
29 --text--
30 #include("test.txt")
31 \--text--
32 \#include("test.txt")
33 \\--text--
35 Now, foreach is a PD.  Escape the first one, and then not the second so it
36 renders.  The third and fourth examples show the single 'unpleasantry' about this.  The \
37 is only an escape when 'touching' VTL, otherwise, it's just schmoo.
39 #foreach(
41 \ first element \ second element \
42 \ first element \ \ second element \ \
43 \first element\ \second element\ \
45 --- Control Structures ----
47 First should be escaped...
48 #if(true) hi #end
50 This isn't.  Note then that it has to render the \\ as a \ because it's stuck to the VTL
52 \ hi \
53 \ hi 
54 And so forth...
55 \#if(true) hi \#end
57 \\ hi \\
58 And more...
60 #if(true)
61         hi
62 #else
63         there
64 #end
66 \       hi
68 \#if(true)
69         hi
70 \#else
71         there
72 \#end
74 \       there
76 \#if(false)
77         hi
78 \#elseif(true)
79         there
80 \#end
83 #$foo1
84 \#$foo1
85 #${foo1}
86 \#$${foo1}
87 #C0C0C0
88 \#C0C0C0
89 #C0C0C0
90 \#$C0C0C0
91 #\$C0C0C0
94 $(QUERY_STRING{forumid})
95 \$(QUERY_STRING{forumid})
96 \\$(QUERY_STRING{forumid})