From ebdfb86387f51fd29ec37b6ca586a062b086f525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 28 Dec 2018 16:57:46 +0800 Subject: =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=83=A8=E5=88=86=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E5=86=99=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/test/document_symbol/init.lua | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) (limited to 'server/test/document_symbol') diff --git a/server/test/document_symbol/init.lua b/server/test/document_symbol/init.lua index 746ec108..4f806bfe 100644 --- a/server/test/document_symbol/init.lua +++ b/server/test/document_symbol/init.lua @@ -84,16 +84,44 @@ end } } +TEST [[ +function f() +end +]] +{ + [1] = { + name = 'f', + detail = 'function f()', + kind = SymbolKind.Function, + range = {1, 16}, + selectionRange = {10, 10}, + } +} + +TEST [[ +return function () +end +]] +{ + [1] = { + name = '', + detail = 'function ()', + kind = SymbolKind.Function, + range = {8, 22}, + selectionRange = {8, 8}, + } +} + --TEST [[ ---return function () +--local f = function () --end --]] --{ -- [1] = { --- name = '', +-- name = 'f', -- detail = 'function f()', -- kind = SymbolKind.Function, --- range = {8, 22}, --- selectionRange = {8, 8}, +-- range = {11, 25}, +-- selectionRange = {11, 11}, -- } --} -- cgit v1.2.3