diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-07-24 20:20:48 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-07-24 20:20:48 +0800 |
commit | 1e11d151c29b1e107c09ef694ed9fe2d929b6fc9 (patch) | |
tree | 4422f8eb37333b7b0e4f3884ce8ae0da82911290 /test-beta/crossfile/definition.lua | |
parent | ad0db70b2eb45f956e7e301fddf133025e58c7d9 (diff) | |
download | lua-language-server-1e11d151c29b1e107c09ef694ed9fe2d929b6fc9.zip |
更多的定义穿透
Diffstat (limited to 'test-beta/crossfile/definition.lua')
-rw-r--r-- | test-beta/crossfile/definition.lua | 50 |
1 files changed, 47 insertions, 3 deletions
diff --git a/test-beta/crossfile/definition.lua b/test-beta/crossfile/definition.lua index 03bb6404..a642f68d 100644 --- a/test-beta/crossfile/definition.lua +++ b/test-beta/crossfile/definition.lua @@ -120,7 +120,7 @@ TEST { TEST { { path = 'a.lua', - content = 'local <!t!> = 1; return t', + content = 'local <!t!> = 1; return <!t!>', }, { path = 'b.lua', @@ -146,7 +146,7 @@ end TEST { { path = 'a.lua', - content = 'local <!t!> = 1; return t', + content = 'local <!t!> = 1; return <!t!>', }, { path = 'b.lua', @@ -357,7 +357,7 @@ TEST { content = [[ local function <!f!>() end - return f + return <!f!> ]] }, { @@ -451,6 +451,50 @@ TEST { } } +TEST { + { + path = 'a.lua', + content = [[ + local m = {} + function m.<!func!>() + end + return m + ]] + }, + { + path = 'b.lua', + content = [[ + local x = require 'a' + print(x.<?func?>) + ]] + } +} + +TEST { + { + path = 'a.lua', + content = [[ + return <!function () + end!> + ]] + }, + { + path = 'middle.lua', + content = [[ + return { + <!func!> = require 'a' + } + ]] + }, + { + path = 'b.lua', + content = [[ + local x = require 'middle' + print(x.<?func?>) + ]] + } +} + --TEST { -- { -- path = 'a.lua', |