diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-04-29 20:53:48 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-04-29 20:53:48 +0800 |
commit | 7b88ef49ea8ce3e359b035e1858d4d80385be86d (patch) | |
tree | 538b92feeca43544eea59cfe6bc7fbbd9e8077e2 /test | |
parent | 3767fa4c6e59003fb1b5a3cbce867eabc3e69f25 (diff) | |
download | lua-language-server-7b88ef49ea8ce3e359b035e1858d4d80385be86d.zip |
fix tests
Diffstat (limited to 'test')
-rw-r--r-- | test/diagnostics/init.lua | 8 | ||||
-rw-r--r-- | test/document_symbol/init.lua | 32 |
2 files changed, 24 insertions, 16 deletions
diff --git a/test/diagnostics/init.lua b/test/diagnostics/init.lua index 00a2cda8..d4bffdb5 100644 --- a/test/diagnostics/init.lua +++ b/test/diagnostics/init.lua @@ -100,7 +100,7 @@ local <!t!> = {} ]] TEST([[ -<!local function x() +local <!function x() end!> ]], [[ @@ -119,9 +119,9 @@ local <!x!> ]] TEST([[ -<!local function x() +local <!function x() end!> -<!local function y() +local <!function y() x() end!> ]], @@ -363,7 +363,7 @@ local f;f = <!function () end!> ]] TEST [[ -<!local function f() end!> +local <!function f() end!> ]] config.config.diagnostics.disable['unused-local'] = nil diff --git a/test/document_symbol/init.lua b/test/document_symbol/init.lua index d9f1bec3..718089e2 100644 --- a/test/document_symbol/init.lua +++ b/test/document_symbol/init.lua @@ -77,9 +77,9 @@ end name = 'f', detail = 'function ()', kind = define.SymbolKind.Function, - range = {1, 22}, + range = {7, 22}, selectionRange = {16, 16}, - valueRange = {1, 22}, + valueRange = {7, 22}, } } @@ -227,9 +227,9 @@ local z name = 'f', detail = 'function ()', kind = define.SymbolKind.Function, - range = {13, 79}, + range = {19, 79}, selectionRange = {28, 28}, - valueRange = {13, 79}, + valueRange = {19, 79}, children = { [1] = { name = 'x', @@ -360,9 +360,9 @@ g = 1 name = 'g', detail = 'function ()', kind = define.SymbolKind.Function, - range = {1, 22}, + range = {7, 22}, selectionRange = {16, 16}, - valueRange = {1, 22}, + valueRange = {7, 22}, }, [2] = { name = 'g', @@ -449,6 +449,14 @@ local function range = {7, 7}, selectionRange = {7, 7}, }, + [2] = { + name = "", + detail = "function ()", + kind = 12, + range = {15, 22}, + selectionRange = {15, 15}, + valueRange = {15, 22}, + }, } TEST [[ @@ -496,17 +504,17 @@ end name = 'x', detail = 'function ()', kind = define.SymbolKind.Function, - range = {1, 22}, + range = {7, 22}, selectionRange = {16, 16}, - valueRange = {1, 22}, + valueRange = {7, 22}, }, [2] = { name = 'f', detail = 'function ()', kind = define.SymbolKind.Function, - range = {25, 58}, + range = {31, 58}, selectionRange = {40, 40}, - valueRange = {25, 58}, + valueRange = {31, 58}, children = { [1] = { name = 'c', @@ -563,9 +571,9 @@ end name = 'f', detail = 'function (a, b)', kind = define.SymbolKind.Function, - range = {15, 40}, + range = {21, 40}, selectionRange = {30, 30}, - valueRange = {15, 40}, + valueRange = {21, 40}, children = { [1] = { name = 'a', |