summaryrefslogtreecommitdiff
path: root/script/test/definition/table.lua
blob: 90e7926f607f6278a825f5f9227a77f1c5092211 (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
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 = {
    <!insert!> = 1,
}
t.<?insert?>()
]]

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

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