summaryrefslogtreecommitdiff
path: root/server/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-07 17:11:26 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-07 17:11:26 +0800
commitf3260ceb043848c26dd7ef45d0a5210ea6d4a5ba (patch)
tree90a0faf0de315b175154f23ba3287c9ea86aaf95 /server/test
parent2b03350caa83e66d6bb4cd73be3809ac9cea2225 (diff)
downloadlua-language-server-f3260ceb043848c26dd7ef45d0a5210ea6d4a5ba.zip
hover支持变量对象
Diffstat (limited to 'server/test')
-rw-r--r--server/test/find_lib/init.lua5
-rw-r--r--server/test/main.lua3
2 files changed, 8 insertions, 0 deletions
diff --git a/server/test/find_lib/init.lua b/server/test/find_lib/init.lua
index 1efb2423..910167c8 100644
--- a/server/test/find_lib/init.lua
+++ b/server/test/find_lib/init.lua
@@ -78,3 +78,8 @@ t.<?insert?>()
TEST 'table.insert' [[
require 'table'.<?insert?>()
]]
+
+TEST '*string:sub' [[
+local str = 'xxx'
+str:<?sub?>(1, 1)
+]]
diff --git a/server/test/main.lua b/server/test/main.lua
index 9b6e2c02..fc9c99a5 100644
--- a/server/test/main.lua
+++ b/server/test/main.lua
@@ -1,5 +1,8 @@
local fs = require 'bee.filesystem'
+
ROOT = fs.current_path()
+LANG = 'en-US'
+
package.path = (ROOT / 'src' / '?.lua'):string()
.. ';' .. (ROOT / 'src' / '?' / 'init.lua'):string()
.. ';' .. (ROOT / 'test' / '?.lua'):string()