From 5914857908ea6df3fbf423c83227c9595e779b20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 21 Mar 2019 14:02:05 +0800 Subject: =?UTF-8?q?=E5=8A=A0=E4=B8=AA=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/test/crossfile/definition.lua | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) (limited to 'server/test/crossfile') 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 () + print() + end + ]], + }, + { + path = 'b.lua', + content = [[ + local f = require 'a' + local v = 1 + f(v) + ]], + }, +} -- cgit v1.2.3