summaryrefslogtreecommitdiff
path: root/server/test/definition/table.lua
blob: 23af390d3c614e028413e8ba7c6ecbf3434fa0b3 (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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
TEST [[
local <!t!>
a = {
    <?t?>
}
]]

TEST [[
local t
t.<!x!> = 1
t.<?x?>()
]]

TEST [[
t.<!x!> = 1
t.<?x?>()
]]

TEST [[
local <!t!>
t.x = 1
<?t?>.x = 1
]]

TEST [[
t.<!x!> = 1
t.<?x?>.y = 1
]]

TEST [[
local t
t.<!x!> = 1
t.<?x?>()
]]

TEST [[
local t
t<![1]!> = 1
t[<?1?>]()
]]

TEST [[
local t
t<![true]!> = 1
t[<?true?>]()
]]

TEST [[
local t
t<!["method"]!> = 1
t[<?"method"?>]()
]]

TEST [[
local t
t<!["longString"]!> = 1
t[<?[==[longString]==]?>]()
]]

TEST [[
local t
t.<!x!> = 1
t[<?'x'?>]()
]]

TEST [[
local t
t.<!a!> = 1
t.<?a?>.b()
]]

TEST [[
local t
local <!x!>
t[<?x?>]()
]]

TEST[[
local <!t!>
local _ = {
    _ = <?t?>
}
]]

TEST[[
local <!t!>
t {
    _ = <?t?>.x
}
]]

TEST[[
local t
t.<?after?>()
t.<!after!> = a
]]

TEST[[
local t = {
    <!insert!> = 1,
}
t.<?insert?>()
]]

TEST[[
local t = {
    <!insert!> = 1,
}
y.<?insert?>()
]]

TEST[[
local t = {
    <!insert!> = 1,
}
local y = {
    insert = 1,
}
t.<?insert?>()
]]