summaryrefslogtreecommitdiff
path: root/test/crossfile
diff options
context:
space:
mode:
Diffstat (limited to 'test/crossfile')
-rw-r--r--test/crossfile/completion.lua4
-rw-r--r--test/crossfile/definition.lua3
-rw-r--r--test/crossfile/document_symbol.lua3
-rw-r--r--test/crossfile/hover.lua4
-rw-r--r--test/crossfile/references.lua4
5 files changed, 5 insertions, 13 deletions
diff --git a/test/crossfile/completion.lua b/test/crossfile/completion.lua
index ab017716..14744430 100644
--- a/test/crossfile/completion.lua
+++ b/test/crossfile/completion.lua
@@ -64,9 +64,7 @@ end
function TEST(data)
local lsp = service()
- local ws = workspace(lsp, 'test')
- lsp.workspace = ws
- ws.root = ROOT
+ local ws = lsp:addWorkspace('test', uric.encode(ROOT))
local mainUri
local mainBuf
diff --git a/test/crossfile/definition.lua b/test/crossfile/definition.lua
index 02209609..c59e5999 100644
--- a/test/crossfile/definition.lua
+++ b/test/crossfile/definition.lua
@@ -44,8 +44,7 @@ end
function TEST(datas)
local lsp = service()
- local ws = workspace(lsp, 'test')
- lsp.workspace = ws
+ local ws = lsp:addWorkspace('test', uric.encode(ROOT))
local compiled = {}
local targetList = {}
diff --git a/test/crossfile/document_symbol.lua b/test/crossfile/document_symbol.lua
index 23bd6af3..50a7ff9e 100644
--- a/test/crossfile/document_symbol.lua
+++ b/test/crossfile/document_symbol.lua
@@ -65,8 +65,7 @@ rawset(_G, 'TEST', true)
function TEST(data)
local lsp = service()
- local ws = workspace(lsp, 'test')
- lsp.workspace = ws
+ local ws = lsp:addWorkspace('test', uric.encode(ROOT))
local targetUri = uric.encode(ROOT / fs.path(data[1].path))
local sourceUri = uric.encode(ROOT / fs.path(data[2].path))
diff --git a/test/crossfile/hover.lua b/test/crossfile/hover.lua
index f2560673..1472f1b6 100644
--- a/test/crossfile/hover.lua
+++ b/test/crossfile/hover.lua
@@ -56,9 +56,7 @@ end
function TEST(data)
local lsp = service()
- local ws = workspace(lsp, 'test')
- lsp.workspace = ws
- ws.root = ROOT
+ local ws = lsp:addWorkspace('test', uric.encode(ROOT))
local targetScript = data[1].content
local targetUri = uric.encode(ROOT / fs.path(data[1].path))
diff --git a/test/crossfile/references.lua b/test/crossfile/references.lua
index 87577770..0c594354 100644
--- a/test/crossfile/references.lua
+++ b/test/crossfile/references.lua
@@ -72,9 +72,7 @@ end
function TEST(data)
local lsp = service()
- local ws = workspace(lsp, 'test')
- lsp.workspace = ws
- ws.root = ROOT
+ local ws = lsp:addWorkspace('test', uric.encode(ROOT))
local mainUri
local pos