summaryrefslogtreecommitdiff
path: root/test-beta
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-09-28 02:43:52 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-09-28 02:43:52 +0800
commit274cd6b326ca6be0da65ebde79f8c48c83bc406b (patch)
treebc20cc1cc5a1be2645e18db35a4c1ef0a71c0354 /test-beta
parentc352af7a59b14f60ea5aca7bddfbc891068b4cb0 (diff)
downloadlua-language-server-274cd6b326ca6be0da65ebde79f8c48c83bc406b.zip
hover也显示推测的搜索路径
Diffstat (limited to 'test-beta')
-rw-r--r--test-beta/crossfile/definition.lua12
-rw-r--r--test-beta/crossfile/hover.lua17
2 files changed, 28 insertions, 1 deletions
diff --git a/test-beta/crossfile/definition.lua b/test-beta/crossfile/definition.lua
index c5601a1f..99e1d7f2 100644
--- a/test-beta/crossfile/definition.lua
+++ b/test-beta/crossfile/definition.lua
@@ -119,6 +119,18 @@ TEST {
TEST {
{
+ path = 'aaa/bbb.lua',
+ content = '',
+ target = {0, 0},
+ },
+ {
+ path = 'b.lua',
+ content = 'require "<?bbb?>"',
+ },
+}
+
+TEST {
+ {
path = 'a.lua',
content = 'local <!t!> = 1; return <!t!>',
},
diff --git a/test-beta/crossfile/hover.lua b/test-beta/crossfile/hover.lua
index d73aeb7f..594094ba 100644
--- a/test-beta/crossfile/hover.lua
+++ b/test-beta/crossfile/hover.lua
@@ -85,7 +85,22 @@ TEST {
},
hover = {
label = '1 个字节',
- description = [[* [a.lua](file:///a.lua)]],
+ description = [[* [a.lua](file:///a.lua) (假设搜索路径包含 `?.lua`)]],
+ }
+}
+
+TEST {
+ {
+ path = 'folder/a.lua',
+ content = '',
+ },
+ {
+ path = 'b.lua',
+ content = 'require <?"a"?>',
+ },
+ hover = {
+ label = '1 个字节',
+ description = [[* [folder\a.lua](file:///folder/a.lua) (假设搜索路径包含 `folder\?.lua`)]],
}
}