summaryrefslogtreecommitdiff
path: root/test/type_inference/init.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-10-12 16:33:29 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-10-12 16:33:29 +0800
commitea2795520e68db8737bd6d0ab7a93d5e5a482346 (patch)
tree5f21f8392ad123497f52ab893e79cb3013879456 /test/type_inference/init.lua
parent896a1affdeed8304688611674df88140a5cc180e (diff)
downloadlua-language-server-ea2795520e68db8737bd6d0ab7a93d5e5a482346.zip
cleanup
Diffstat (limited to 'test/type_inference/init.lua')
-rw-r--r--test/type_inference/init.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/type_inference/init.lua b/test/type_inference/init.lua
index f0948b49..43177dc7 100644
--- a/test/type_inference/init.lua
+++ b/test/type_inference/init.lua
@@ -7,7 +7,7 @@ local vm = require 'vm'
rawset(_G, 'TEST', true)
local function getSource(pos)
- local state = files.getState('')
+ local state = files.getState(TESTURI)
if not state then
return
end
@@ -31,15 +31,15 @@ end
function TEST(wanted)
return function (script)
local newScript, catched = catch(script, '?')
- files.setText('', newScript)
+ files.setText(TESTURI, newScript)
local source = getSource(catched['?'][1][1])
assert(source)
- local result = vm.getInfer(source):view('')
+ local result = vm.getInfer(source):view(TESTURI)
if wanted ~= result then
- vm.getInfer(source):view('')
+ vm.getInfer(source):view(TESTURI)
end
assert(wanted == result)
- files.remove('')
+ files.remove(TESTURI)
end
end