blob: 07ea9ebb5d4ff90e4a1d9982176857f1aec1a07f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
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()
.. ';' .. (ROOT / 'test' / '?' / 'init.lua'):string()
log = require 'log'
log.init(ROOT, ROOT / 'log' / 'test.log')
log.debug('测试开始')
ac = {}
require 'utility'
require 'global_protect'
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 'references'
test 'diagnostics'
test 'type_inference'
test 'find_lib'
test 'hover'
test 'completion'
test 'signature'
test 'document_symbol'
test 'crossfile'
test 'full'
print('测试完成')
end
main()
log.debug('测试完成')
|