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 /test/test.lua | |
parent | 8d900e4126f8a5284068362f51105b999bb966fb (diff) | |
download | lua-language-server-137afac8fbda740b56c3e4b8f8e77260c29f0b10.zip |
整理测试代码
Diffstat (limited to 'test/test.lua')
-rw-r--r-- | test/test.lua | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/test/test.lua b/test/test.lua deleted file mode 100644 index 5e238049..00000000 --- a/test/test.lua +++ /dev/null @@ -1,61 +0,0 @@ -local currentPath = debug.getinfo(1, 'S').source:sub(2) -local rootPath = currentPath:gsub('[^/\\]-$', '') -if rootPath == '' then - rootPath = './' -end -dofile(rootPath .. 'platform.lua') -package.path = package.path - .. ';' .. rootPath .. 'test/?.lua' - .. ';' .. rootPath .. 'test/?/init.lua' -local fs = require 'bee.filesystem' -ROOT = fs.absolute(fs.path(rootPath):parent_path()) -LANG = 'en-US' - -log = require 'log' -log.init(ROOT, ROOT / 'log' / 'test.log') -log.debug('测试开始') -ac = {} - -require 'utility' -dofile((ROOT / 'build_package.lua'):string()) - -local function loadAllLibs() - assert(require 'bee.filesystem') - assert(require 'bee.subprocess') - assert(require 'bee.thread') - assert(require 'bee.socket') - assert(require 'lni') - assert(require 'lpeglabel') -end - -local function main() - local function test(name) - local clock = os.clock() - print(('测试[%s]...'):format(name)) - require(name) - print(('测试[%s]用时[%.3f]'):format(name, os.clock() - clock)) - end - - test 'core' - test 'definition' - test 'rename' - test 'highlight' - test 'references' - test 'diagnostics' - test 'type_inference' - test 'find_lib' - test 'hover' - test 'completion' - test 'signature' - test 'document_symbol' - test 'crossfile' - test 'full' - test 'other' - - print('测试完成') -end - -loadAllLibs() -main() - -log.debug('测试完成') |