summaryrefslogtreecommitdiff
path: root/test-beta/crossfile/completion.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-09-13 19:23:09 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-09-13 19:23:09 +0800
commitb22099c12e001bf81a6d1cf47655e6e815d04391 (patch)
tree79be562401816f70c831003ab6f7216b4c21350e /test-beta/crossfile/completion.lua
parent2dacca7b19ba0162975c7f2da2dd5e9381b4a73c (diff)
downloadlua-language-server-b22099c12e001bf81a6d1cf47655e6e815d04391.zip
支持自动完成 dofile
Diffstat (limited to 'test-beta/crossfile/completion.lua')
-rw-r--r--test-beta/crossfile/completion.lua21
1 files changed, 21 insertions, 0 deletions
diff --git a/test-beta/crossfile/completion.lua b/test-beta/crossfile/completion.lua
index 6801abb7..0e344a5b 100644
--- a/test-beta/crossfile/completion.lua
+++ b/test-beta/crossfile/completion.lua
@@ -521,3 +521,24 @@ TEST {
},
}
}
+
+TEST {
+ {
+ path = [[abc/init.lua]],
+ content = ''
+ },
+ {
+ path = 'main.lua',
+ content = [[
+ dofile 'ab$'
+ ]],
+ main = true,
+ },
+ completion = {
+ {
+ label = [[abc\init.lua]],
+ kind = CompletionItemKind.Reference,
+ textEdit = EXISTS,
+ },
+ }
+}