summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-01-18 06:10:55 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-01-18 06:10:55 +0800
commitbddeb50920da81a6cecd91100aed018769bcc5b7 (patch)
tree9e0c1d979431c5e17da606ec35a9d22fb17dd8f9 /test
parentefffa22c25f713f8e37bb22e891319076f5b759d (diff)
downloadlua-language-server-bddeb50920da81a6cecd91100aed018769bcc5b7.zip
normalize uri from RPC
fix #1810
Diffstat (limited to 'test')
-rw-r--r--test/tclient/tests/change-workspace-folder.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/tclient/tests/change-workspace-folder.lua b/test/tclient/tests/change-workspace-folder.lua
index abd385cb..a9b0e36a 100644
--- a/test/tclient/tests/change-workspace-folder.lua
+++ b/test/tclient/tests/change-workspace-folder.lua
@@ -98,4 +98,22 @@ lclient():start(function (client)
assert(files.getState(rootUri .. '/ws1/test.lua') == nil)
assert(files.getState(rootUri .. '/ws2/test.lua') == nil)
assert(files.getState(rootUri .. '/ws3/test.lua') ~= nil)
+
+ -- normalize uri
+ client:notify('workspace/didChangeWorkspaceFolders', {
+ event = {
+ added = {
+ {
+ name = 'ws2',
+ uri = rootUri .. '%2F%77%73%32'--[[/ws2]],
+ },
+ },
+ removed = {},
+ },
+ })
+
+ ws.awaitReady(rootUri .. '/ws2')
+ assert(files.getState(rootUri .. '/ws1/test.lua') == nil)
+ assert(files.getState(rootUri .. '/ws2/test.lua') ~= nil)
+ assert(files.getState(rootUri .. '/ws3/test.lua') ~= nil)
end)