diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-09-23 17:52:07 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-09-23 17:52:07 +0800 |
commit | 0b86b5e7b4e02b3cdd2185dd962a23ab9b276507 (patch) | |
tree | ade09922662433e9605acb0f18b3451195eb20a9 /test-beta/document_symbol | |
parent | 52f2051b51fdf9f56c8a19b4884bfef8787b9af8 (diff) | |
download | lua-language-server-0b86b5e7b4e02b3cdd2185dd962a23ab9b276507.zip |
更新文件符号
Diffstat (limited to 'test-beta/document_symbol')
-rw-r--r-- | test-beta/document_symbol/init.lua | 42 |
1 files changed, 6 insertions, 36 deletions
diff --git a/test-beta/document_symbol/init.lua b/test-beta/document_symbol/init.lua index 1abe4913..fa260dbb 100644 --- a/test-beta/document_symbol/init.lua +++ b/test-beta/document_symbol/init.lua @@ -1,35 +1,6 @@ -local parser = require 'parser' -local core = require 'core' -local buildVM = require 'vm' - -local SymbolKind = { - File = 1, - Module = 2, - Namespace = 3, - Package = 4, - Class = 5, - Method = 6, - Property = 7, - Field = 8, - Constructor = 9, - Enum = 10, - Interface = 11, - Function = 12, - Variable = 13, - Constant = 14, - String = 15, - Number = 16, - Boolean = 17, - Array = 18, - Object = 19, - Key = 20, - Null = 21, - EnumMember = 22, - Struct = 23, - Event = 24, - Operator = 25, - TypeParameter = 26, -} +local core = require 'core.document-symbol' +local files = require 'files' +local SymbolKind = require 'define.SymbolKind' rawset(_G, 'TEST', true) @@ -76,10 +47,9 @@ end function TEST(script) return function (expect) - local ast = parser:parse(script, 'lua', 'Lua 5.3') - local vm = buildVM(ast) - assert(vm) - local result = core.documentSymbol(vm) + files.removeAll() + files.setText('', script) + local result = core('') assert(eq(expect, result)) checkArcoss(result) end |