summaryrefslogtreecommitdiff
path: root/server/test
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-23 14:59:06 +0800
committersumneko <sumneko@hotmail.com>2019-04-23 14:59:06 +0800
commit89f26bfd51199ac8ac34a358d70563897e5b8d57 (patch)
treec7aed7280bfdf367344c2d3d5a0b0bf6e4aedd34 /server/test
parent86d6ea6811d2fe6d55351a4b98c5227214e74cad (diff)
downloadlua-language-server-89f26bfd51199ac8ac34a358d70563897e5b8d57.zip
优化definition
Diffstat (limited to 'server/test')
-rw-r--r--server/test/crossfile/definition.lua61
1 files changed, 61 insertions, 0 deletions
diff --git a/server/test/crossfile/definition.lua b/server/test/crossfile/definition.lua
index cc06af11..e49308a1 100644
--- a/server/test/crossfile/definition.lua
+++ b/server/test/crossfile/definition.lua
@@ -302,6 +302,67 @@ TEST {
{
path = 'a.lua',
content = [[
+ return <!{
+ a = 1,
+ }!>
+ ]],
+ },
+ {
+ path = 'b.lua',
+ content = [[
+ local <?t?> = require 'a'
+ ]]
+ }
+}
+
+TEST {
+ {
+ path = 'a.lua',
+ content = [[
+ return <!function () end!>
+ ]]
+ },
+ {
+ path = 'b.lua',
+ content = [[
+ local f = require 'a'
+ ]]
+ },
+ {
+ path = 'c.lua',
+ content = [[
+ local <?f?> = require 'a'
+ ]]
+ }
+}
+
+TEST {
+ {
+ path = 'a.lua',
+ content = [[
+ local function <!f!>()
+ end
+ return f
+ ]]
+ },
+ {
+ path = 'b.lua',
+ content = [[
+ local f = require 'a'
+ ]]
+ },
+ {
+ path = 'c.lua',
+ content = [[
+ local <?f?> = require 'a'
+ ]]
+ }
+}
+
+TEST {
+ {
+ path = 'a.lua',
+ content = [[
---@class Class
local <!obj!>
]]