summaryrefslogtreecommitdiffhomepage
path: root/tests/00_syntax/11_misc_literals
blob: 372741ca93bbd514bd43a1ad22a5a6a7a2c1d117 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
The utpl script language features a number of keywords which represent
certain special values.

-- Expect stdout --
The "this" keyword refers to the current function context: object
The "null" keyword represents the null value: null
The "true" keyword represents a true boolean value: true
The "false" keyword represents a false boolean value: false
-- End --

-- Testcase --
{% let t = { f: function() { return this; } } %}
The "this" keyword refers to the current function context: {{ type(t.f()) }}
The "null" keyword represents the null value: {{ "" + null }}
The "true" keyword represents a true boolean value: {{ true }}
The "false" keyword represents a false boolean value: {{ false }}
-- End --