diff options
Diffstat (limited to 'server/test/crossfile/definition.lua')
-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) + ]], + }, +} |