diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-08-18 16:40:56 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-08-18 16:40:56 +0800 |
commit | 332ba28abb7dfe6f45242c978376b3b88c720284 (patch) | |
tree | b472ad654cd493819c46161f9fa469d19f33aed4 /test-beta/definition | |
parent | f8ca20e2227c2d1bbb2b7875c411ad36aab9f83e (diff) | |
download | lua-language-server-332ba28abb7dfe6f45242c978376b3b88c720284.zip |
打开一些测试
Diffstat (limited to 'test-beta/definition')
-rw-r--r-- | test-beta/definition/method.lua | 46 | ||||
-rw-r--r-- | test-beta/definition/special.lua | 50 | ||||
-rw-r--r-- | test-beta/definition/table.lua | 18 |
3 files changed, 58 insertions, 56 deletions
diff --git a/test-beta/definition/method.lua b/test-beta/definition/method.lua index 3ef3055c..aa7aacdc 100644 --- a/test-beta/definition/method.lua +++ b/test-beta/definition/method.lua @@ -6,26 +6,26 @@ function mt:b() end ]] ---TEST [[ ---function mt:<!m1!>() ---end ---function mt:m2() --- self:<?m1?>() ---end ---]] --- ---TEST [[ ---function mt:m3() --- mt:<?m4?>() ---end ---function mt:<!m4!>() ---end ---]] --- ---TEST [[ ---function mt:m3() --- self:<?m4?>() ---end ---function mt:<!m4!>() ---end ---]] +TEST [[ +function mt:<!m1!>() +end +function mt:m2() + self:<?m1?>() +end +]] + +TEST [[ +function mt:m3() + mt:<?m4?>() +end +function mt:<!m4!>() +end +]] + +TEST [[ +function mt:m3() + self:<?m4?>() +end +function mt:<!m4!>() +end +]] diff --git a/test-beta/definition/special.lua b/test-beta/definition/special.lua index d4286e88..4e3728e3 100644 --- a/test-beta/definition/special.lua +++ b/test-beta/definition/special.lua @@ -51,6 +51,7 @@ setmetatable(api, { __index = mt }) api:<?method1?>() ]] +-- TODO 不支持从方法内部找外部的赋值 --TEST [[ --local mt --function mt:x() @@ -62,6 +63,7 @@ api:<?method1?>() --obj:x() --]] +-- TODO 不支持从方法内部找外部的赋值 --TEST [[ --local mt --function mt:x() @@ -72,6 +74,7 @@ api:<?method1?>() --obj:x() --]] +-- TODO 不支持从方法内部找外部的赋值 --TEST [[ --local mt --function mt:x() @@ -97,28 +100,27 @@ local obj = sm({}, mt) obj:<?method1?>() ]] --- TODO ---TEST [[ ---local mt = {} ---function mt:<!x!>() ---end --- ---local obj = setmetatable({}, {__index = mt}) ---function obj:x() ---end --- ---mt:<?x?>() ---]] +TEST [[ +local mt = {} +function mt:<!x!>() +end --- TODO 通过代码执行顺序来判断 ---TEST [[ ---local mt = {} ---function mt:x() ---end --- ---local obj = setmetatable({}, {__index = mt}) ---function obj:<!x!>() ---end --- ---obj:<?x?>() ---]] +local obj = setmetatable({}, {__index = mt}) +function obj:x() +end + +mt:<?x?>() +]] + +-- TODO 通过代码执行顺序来判断? +TEST [[ +local mt = {} +function mt:<!x!>() +end + +local obj = setmetatable({}, {__index = mt}) +function obj:<!x!>() +end + +obj:<?x?>() +]] diff --git a/test-beta/definition/table.lua b/test-beta/definition/table.lua index 34078413..0b90fe00 100644 --- a/test-beta/definition/table.lua +++ b/test-beta/definition/table.lua @@ -124,12 +124,12 @@ t.<?insert?>() --y.<?insert?>() --]] ---TEST[[ ---local t = { --- <!insert!> = 1, ---} ---local y = { --- insert = 1, ---} ---t.<?insert?>() ---]] +TEST[[ +local t = { + <!insert!> = 1, +} +local y = { + insert = 1, +} +t.<?insert?>() +]] |