diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-01-22 14:56:28 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-01-22 14:56:28 +0800 |
commit | ce28b76cfc597e0cef3a62d8f7e181cf7ff4c904 (patch) | |
tree | facd441241b6febbf02face32be517dee275c90e /server/test/document_symbol | |
parent | 04ff98eed8c5545f80dacb636876606e90bb57af (diff) | |
download | lua-language-server-ce28b76cfc597e0cef3a62d8f7e181cf7ff4c904.zip |
修正文档符号有时生成失败的问题
Diffstat (limited to 'server/test/document_symbol')
-rw-r--r-- | server/test/document_symbol/init.lua | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/server/test/document_symbol/init.lua b/server/test/document_symbol/init.lua index 89c18e35..7d7a6b23 100644 --- a/server/test/document_symbol/init.lua +++ b/server/test/document_symbol/init.lua @@ -336,6 +336,30 @@ g = 1 } } +TEST[[ +function f(...) + local x = ... + print(x.a) +end +]]{ + [1] = { + name = 'f', + detail = 'function f(...)', + kind = SymbolKind.Function, + range = {1, 52}, + selectionRange = {10, 10}, + children = { + [1] = { + name = 'x', + detail = EXISTS, + kind = SymbolKind.Variable, + range = {27, 27}, + selectionRange = {27, 27}, + } + } + }, +} + -- 临时 local fs = require 'bee.filesystem' local function testIfExit(path) |