From 3f9ca58f22eeccd30ff1093c9874bfa79d40a29f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 24 Dec 2018 14:08:22 +0800 Subject: =?UTF-8?q?=E6=8D=A2=E4=B8=AArequire=E7=9A=84=E5=81=9A=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/test/crossfile/definition.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'server/test/crossfile/definition.lua') diff --git a/server/test/crossfile/definition.lua b/server/test/crossfile/definition.lua index 43261771..11d5f746 100644 --- a/server/test/crossfile/definition.lua +++ b/server/test/crossfile/definition.lua @@ -38,14 +38,14 @@ function TEST(data) local sourceScript, sourceList = catch_target(data[2].content, '?') local sourceUri = ws:uriEncode(fs.path(data[2].path)) - lsp:saveText(targetUri, 1, targetScript) lsp:saveText(sourceUri, 1, sourceScript) - ws:addFile(targetUri) ws:addFile(sourceUri) - lsp:compileVM(targetUri) - lsp:compileVM(sourceUri) + lsp:saveText(targetUri, 1, targetScript) + ws:addFile(targetUri) + lsp:compileAll() + lsp:compileAll() - local sourceVM = lsp:loadVM(sourceUri) + local sourceVM = lsp:getVM(sourceUri) assert(sourceVM) local sourcePos = (sourceList[1][1] + sourceList[1][2]) // 2 local positions = matcher.definition(sourceVM, sourcePos) -- cgit v1.2.3