• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#*
2
3@test ifstatement.vm
4
5This template is used for Velocity regression testing.
6If you alter this template make sure you change the
7corresponding comparison file so that the regression
8test doesn't fail incorrectly.
9
10*#
11
12#set($foo = "woogie" )
13
14start :
15
16#if($foo)
17 right
18#end
19
20#if(!$foo)
21  wrong
22#else
23  right
24#end
25
26#if( !$foo )
27  wrong
28#else
29  right
30#end
31
32#if( ! $foo )
33  wrong
34#else
35  right
36#end
37
38#if( ! ! $foo )
39  right
40#end
41
42
43#if($bar)
44 wrong
45#else
46 right
47#end
48
49#if($bar)
50 wrong
51#elseif( $foo )
52 right
53#end
54
55#if( $bar )
56 wrong
57#elseif( $floogie )
58 wrong
59#elseif( $woppie )
60 wrong
61#else
62 right
63#end
64
65#if(!$bar)
66  right
67#end
68
69#if( !$bar)
70  right
71#end
72
73#if( !!$bar)
74 wrong
75#else
76 right
77#end
78
79done
80