diff options
Diffstat (limited to 'test-beta')
-rw-r--r-- | test-beta/crossfile/init.lua | 2 | ||||
-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 | ||||
-rw-r--r-- | test-beta/hover/init.lua | 2 |
5 files changed, 60 insertions, 58 deletions
diff --git a/test-beta/crossfile/init.lua b/test-beta/crossfile/init.lua index ca70ec44..eca2f808 100644 --- a/test-beta/crossfile/init.lua +++ b/test-beta/crossfile/init.lua @@ -1,4 +1,4 @@ require 'crossfile.definition' require 'crossfile.references' require 'crossfile.hover' -require 'crossfile.completion' +--require 'crossfile.completion' 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?>() +]] diff --git a/test-beta/hover/init.lua b/test-beta/hover/init.lua index 68205e38..d57f4d51 100644 --- a/test-beta/hover/init.lua +++ b/test-beta/hover/init.lua @@ -273,7 +273,7 @@ function string.lower(string) -> string ]] --- TODO 不根据传入值推测参数类型 +-- 不根据传入值推测参数类型 TEST [[ local function x(a, ...) end |