aboutsummaryrefslogtreecommitdiff
path: root/velocity-engine-core/src/test/resources/templates/block.vm
blob: a04f1676874b19ecd0416903c2c019884af1bfae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#*

@test block.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.

*#
First test : spacing between stuff.  Note that spacing preceeding the directives counts!
One blank line follows

#set($foo = false)
#if ($foo)
    this is true
#elseif ($bar)
    this is false
#elseif (true)
    this should be followed by two blank lines
#end


#if (true)
    this is the if statement. (followed by two blank lines)

    #if (true)
    
        this is great (followed by a blank line, 4 spaces on a line,and 2 more, yes there should be one after the 4 spaces)

    #elseif (false)
        this is also great.
    #end

#elseif (true)
    this is the first elseif.
#elseif (false)
    this is the second elseif.
#else
    this is the else statement
#end

-- Second Test : no spacing between anything (1 blank line follows)

#set($foo = false)
#if ($foo)
    this is true
#elseif ($bar)
    this is false
#elseif (true)
    this
#end
#if (true)
    this is the if statement.
    #if (true)
        this is great (line w/ 4 spaces follows (from in front of the \#end) + another blank line)
    #elseif (false)
        this is also great.
    #end
#elseif (true)
    this is the first elseif.
#elseif (false)
    this is the second elseif.
#else
    this is the else statement
#end

------------
#if(false)
False
#else
True
#end
-----------

-- Third Test : tight tight tight.
-- one blank line follows

blargh #if(true)This follows blargh#end

blargh#if(true)This immedately follows blargh with a following newline
#end

-- Fourth Test : different kind of tight. blank line follows

blargh
#if(true)
blargh2
#end
blargh3