diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-03-21 14:02:05 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-03-21 14:02:05 +0800 |
commit | 5914857908ea6df3fbf423c83227c9595e779b20 (patch) | |
tree | d18d0304bc9008a26a217f7a9d2d97319754a146 /server/test/crossfile | |
parent | 999f261b32d8e7433548c818039e38c83b3e2ef8 (diff) | |
download | lua-language-server-5914857908ea6df3fbf423c83227c9595e779b20.zip |
加个测试
Diffstat (limited to 'server/test/crossfile')
-rw-r--r-- | server/test/crossfile/definition.lua | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/server/test/crossfile/definition.lua b/server/test/crossfile/definition.lua index 4a444615..b824c9dc 100644 --- a/server/test/crossfile/definition.lua +++ b/server/test/crossfile/definition.lua @@ -40,19 +40,16 @@ function TEST(datas) targetList = list[1] end targetUri = uri - lsp:saveText(uri, 1, new) - goto CONTINUE + data.content = new end new, list = catch_target(data.content, '?') if new ~= data.content then compiled[i] = new sourceList = list sourceUri = uri - lsp:saveText(uri, 1, new) - goto CONTINUE + data.content = new end lsp:saveText(uri, 1, data.content) - ::CONTINUE:: ws:addFile(uri) end @@ -230,3 +227,22 @@ TEST { ]] } } + +TEST { + { + path = 'a.lua', + content = [[ + return function (<!arg!>) + print(<?arg?>) + end + ]], + }, + { + path = 'b.lua', + content = [[ + local f = require 'a' + local v = 1 + f(v) + ]], + }, +} |