summaryrefslogtreecommitdiff
path: root/test.lua
diff options
context:
space:
mode:
authoractboy168 <actboy168@gmail.com>2021-10-02 12:40:35 +0800
committeractboy168 <actboy168@gmail.com>2021-10-02 12:40:35 +0800
commit754b69b88f8f1053e6452261e30cae9e10ca122c (patch)
treee13c56ed89e2d998b876a43a7ba9556a87f25d5c /test.lua
parent70335a4e87c2d8b82a30926c2560efde94d2587b (diff)
downloadlua-language-server-754b69b88f8f1053e6452261e30cae9e10ca122c.zip
更新编译脚本
Diffstat (limited to 'test.lua')
-rw-r--r--test.lua9
1 files changed, 3 insertions, 6 deletions
diff --git a/test.lua b/test.lua
index 2f01bee6..21d10c5d 100644
--- a/test.lua
+++ b/test.lua
@@ -1,11 +1,8 @@
-local currentPath = debug.getinfo(1, 'S').source:sub(2)
-local rootPath = currentPath:gsub('[/\\]*[^/\\]-$', '')
-rootPath = rootPath == '' and '.' or rootPath
-loadfile(rootPath .. '/platform.lua')('script')
package.path = package.path
- .. ';' .. rootPath .. '/test/?.lua'
- .. ';' .. rootPath .. '/test/?/init.lua'
+ .. ';./test/?.lua'
+ .. ';./test/?/init.lua'
local fs = require 'bee.filesystem'
+local rootPath = fs.exe_path():parent_path():parent_path():parent_path():string()
ROOT = fs.path(rootPath)
TEST = true
DEVELOP = true