diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-12-13 13:40:18 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-12-13 13:40:18 +0800 |
commit | 836a666b12b463843826719f06243a92e18bf314 (patch) | |
tree | 7982688e1fdc499f2624cb7a7f0c58481cd013bb /test-beta/crossfile | |
parent | 9db050598e3df70063fb697dbe19cdb90295c1e1 (diff) | |
download | lua-language-server-836a666b12b463843826719f06243a92e18bf314.zip |
暂存
Diffstat (limited to 'test-beta/crossfile')
-rw-r--r-- | test-beta/crossfile/definition.lua | 40 | ||||
-rw-r--r-- | test-beta/crossfile/references.lua | 40 |
2 files changed, 80 insertions, 0 deletions
diff --git a/test-beta/crossfile/definition.lua b/test-beta/crossfile/definition.lua index 7cf12c74..3b2c1f14 100644 --- a/test-beta/crossfile/definition.lua +++ b/test-beta/crossfile/definition.lua @@ -411,6 +411,46 @@ TEST { }, } +TEST { + { + path = 'a.lua', + content = [[ + local function <!f!>() + end + + return { + <!f!> = f, + } + ]] + }, + { + path = 'c.lua', + content = [[ + local t = require 'a' + local f = t.f + + f() + + return { + f = f, + } + ]] + }, + { + path = 'b.lua', + content = [[ + local t = require 'a' + local <!f!> = t.f + + <?f?>() + + return { + f = f, + } + ]] + } +} + --TEST { -- { -- path = 'a.lua', diff --git a/test-beta/crossfile/references.lua b/test-beta/crossfile/references.lua index a1747dac..67097f3a 100644 --- a/test-beta/crossfile/references.lua +++ b/test-beta/crossfile/references.lua @@ -247,3 +247,43 @@ TEST { ]], }, } + +TEST { + { + path = 'a.lua', + content = [[ + local function <!f!>() + end + + return { + <!f!> = <!f!>, + } + ]] + }, + { + path = 'c.lua', + content = [[ + local t = require 'a' + local <!f!> = t.<!f!> + + <!f!>() + + return { + <!f!> = <!f!>, + } + ]] + }, + { + path = 'b.lua', + content = [[ + local t = require 'a' + local <!f!> = t.<!f!> + + <?f?>() + + return { + <!f!> = <!f!>, + } + ]] + } +} |