diff options
author | sumneko <sumneko@hotmail.com> | 2019-04-22 20:59:16 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-04-22 20:59:16 +0800 |
commit | b741082ca2efc42c62bce3c2634aaec25145b93e (patch) | |
tree | dc8cf9ef406abe74e96ec88e29903fed0dff2b70 /server/test/crossfile/definition.lua | |
parent | 01143c5e09c15c4aae278a2728db753619b35530 (diff) | |
parent | f98ffdd94500e6bb0441401c7de36325b01d5e02 (diff) | |
download | lua-language-server-b741082ca2efc42c62bce3c2634aaec25145b93e.zip |
Merge branch 'master' into EmmyLua
Diffstat (limited to 'server/test/crossfile/definition.lua')
-rw-r--r-- | server/test/crossfile/definition.lua | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/server/test/crossfile/definition.lua b/server/test/crossfile/definition.lua index f49530ea..9310c323 100644 --- a/server/test/crossfile/definition.lua +++ b/server/test/crossfile/definition.lua @@ -89,7 +89,7 @@ function TEST(datas) local sourceVM = lsp:getVM(sourceUri) assert(sourceVM) local sourcePos = (sourceList[1][1] + sourceList[1][2]) // 2 - local positions = core.definition(sourceVM, sourcePos, 'definition', lsp) + local positions = core.definition(sourceVM, sourcePos, 'definition') if positions then assert(founded(targetList, positions)) else @@ -123,6 +123,29 @@ TEST { TEST { { path = 'a.lua', + content = '', + target = {0, 0}, + }, + { + path = 'b.lua', + content = 'require <?"A"?>', + }, +} + +TEST { + { + path = 'a.lua', + content = 'local <!t!> = 1; return <!t!>', + }, + { + path = 'b.lua', + content = 'local <?t?> = require "a"', + }, +} + +TEST { + { + path = 'a.lua', content = [[ local t = { <!x!> = 1, |