diff options
Diffstat (limited to 'test/document_symbol/init.lua')
-rw-r--r-- | test/document_symbol/init.lua | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/test/document_symbol/init.lua b/test/document_symbol/init.lua index 718089e2..d745d53f 100644 --- a/test/document_symbol/init.lua +++ b/test/document_symbol/init.lua @@ -636,3 +636,42 @@ end) children = EXISTS, } } + +TEST [[ +local root = { + inner_function = function () + local function function_inside_function() + end + end + } +]] +{ + [1] = { + name = 'root', + detail = 'local {inner_function}', + kind = define.SymbolKind.Variable, + range = {7, 123}, + selectionRange = {7, 10}, + valueRange = {14, 123}, + children = { + [1] = { + name = 'inner_function', + detail = 'function ()', + kind = define.SymbolKind.Function, + range = {20, 117}, + selectionRange = {20, 33}, + valueRange = {37, 117}, + children = { + [1] = { + name = 'function_inside_function', + detail = 'function ()', + kind = define.SymbolKind.Function, + range = {63, 109}, + selectionRange = {72, 95}, + valueRange = {63, 109}, + }, + }, + }, + }, + } +} |