diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-11-23 00:31:38 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-11-23 00:31:38 +0800 |
commit | 137afac8fbda740b56c3e4b8f8e77260c29f0b10 (patch) | |
tree | c4452dcd19fee789d66991bf6a4a63846d481d56 | |
parent | 8d900e4126f8a5284068362f51105b999bb966fb (diff) | |
download | lua-language-server-137afac8fbda740b56c3e4b8f8e77260c29f0b10.zip |
整理测试代码
-rw-r--r-- | .vscode/launch.json | 4 | ||||
-rw-r--r-- | test-beta.lua (renamed from test-beta/test.lua) | 6 | ||||
-rw-r--r-- | test.lua (renamed from test/test.lua) | 3 |
3 files changed, 6 insertions, 7 deletions
diff --git a/.vscode/launch.json b/.vscode/launch.json index 44af2651..159069cb 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -7,7 +7,7 @@ "type": "lua", "request": "launch", "stopOnEntry": false, - "program": "${workspaceRoot}/server/test.lua", + "program": "${workspaceRoot}/test.lua", "arg": [ ], "consoleCoding": "utf8", @@ -74,7 +74,7 @@ "type": "lua", "request": "launch", "stopOnEntry": false, - "program": "${workspaceRoot}/server-beta/test.lua", + "program": "${workspaceRoot}/test-beta.lua", "arg": [ ], "consoleCoding": "utf8", diff --git a/test-beta/test.lua b/test-beta.lua index dc1023d6..cf9f9ea3 100644 --- a/test-beta/test.lua +++ b/test-beta.lua @@ -1,9 +1,9 @@ local currentPath = debug.getinfo(1, 'S').source:sub(2) local rootPath = currentPath:gsub('[/\\]*[^/\\]-$', '') -dofile(rootPath .. '/platform.lua') +loadfile(rootPath .. '\\platform.lua')('script-beta') package.path = package.path - .. ';' .. rootPath .. '\\test\\?.lua' - .. ';' .. rootPath .. '\\test\\?\\init.lua' + .. ';' .. rootPath .. '\\test-beta\\?.lua' + .. ';' .. rootPath .. '\\test-beta\\?\\init.lua' local fs = require 'bee.filesystem' ROOT = fs.path(rootPath) LANG = 'en-US' diff --git a/test/test.lua b/test.lua index 5e238049..72178860 100644 --- a/test/test.lua +++ b/test.lua @@ -3,7 +3,7 @@ local rootPath = currentPath:gsub('[^/\\]-$', '') if rootPath == '' then rootPath = './' end -dofile(rootPath .. 'platform.lua') +loadfile(rootPath .. 'platform.lua')('script') package.path = package.path .. ';' .. rootPath .. 'test/?.lua' .. ';' .. rootPath .. 'test/?/init.lua' @@ -17,7 +17,6 @@ log.debug('测试开始') ac = {} require 'utility' -dofile((ROOT / 'build_package.lua'):string()) local function loadAllLibs() assert(require 'bee.filesystem') |