summaryrefslogtreecommitdiff
path: root/test-beta/crossfile
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-12-13 13:40:18 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-12-13 13:40:18 +0800
commit836a666b12b463843826719f06243a92e18bf314 (patch)
tree7982688e1fdc499f2624cb7a7f0c58481cd013bb /test-beta/crossfile
parent9db050598e3df70063fb697dbe19cdb90295c1e1 (diff)
downloadlua-language-server-836a666b12b463843826719f06243a92e18bf314.zip
暂存
Diffstat (limited to 'test-beta/crossfile')
-rw-r--r--test-beta/crossfile/definition.lua40
-rw-r--r--test-beta/crossfile/references.lua40
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!>,
+ }
+ ]]
+ }
+}