summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-12-16 17:07:15 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-12-16 17:07:15 +0800
commit8b0d3827faf0cdc967e52ddfbe043c07c0dbe6a2 (patch)
tree34e869b1babfaf99ee04b752878ee53993303815 /test
parentedf22aba16f36ca7784832f7bb6a550ac6ab1af2 (diff)
downloadlua-language-server-8b0d3827faf0cdc967e52ddfbe043c07c0dbe6a2.zip
#847 normalize `./`
Diffstat (limited to 'test')
-rw-r--r--test/crossfile/definition.lua25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/crossfile/definition.lua b/test/crossfile/definition.lua
index 058f5d18..b0cc232f 100644
--- a/test/crossfile/definition.lua
+++ b/test/crossfile/definition.lua
@@ -867,3 +867,28 @@ print(t.<?x?>)
]]
}
}
+
+local originRuntimePath = config.get 'Lua.runtime.path'
+config.set('Lua.runtime.path', {
+ './?.lua'
+})
+
+TEST {
+ {
+ path = 'a.lua',
+ content = [[
+return {
+ <!x!> = 1,
+}
+]],
+ },
+ {
+ path = 'b.lua',
+ content = [[
+local t = require 'a'
+print(t.<?x?>)
+ ]]
+ }
+}
+
+config.set('Lua.runtime.path', originRuntimePath)