summaryrefslogtreecommitdiff
path: root/server/test
diff options
context:
space:
mode:
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!>
]]