aboutsummaryrefslogtreecommitdiff
path: root/test/functional/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/plugin')
-rw-r--r--test/functional/plugin/lsp/incremental_sync_spec.lua26
-rw-r--r--test/functional/plugin/lsp_spec.lua10
2 files changed, 33 insertions, 3 deletions
diff --git a/test/functional/plugin/lsp/incremental_sync_spec.lua b/test/functional/plugin/lsp/incremental_sync_spec.lua
index 890db4abf5..5dd34e7665 100644
--- a/test/functional/plugin/lsp/incremental_sync_spec.lua
+++ b/test/functional/plugin/lsp/incremental_sync_spec.lua
@@ -297,7 +297,31 @@ describe('incremental synchronization', function()
}
test_edit({"🔥"}, {"x"}, expected_text_changes, 'utf-16', '\n')
end)
- it('deleting a multiple lines containing multibyte characters', function()
+ it('deleting a multibyte character from a long line', function()
+ local expected_text_changes = {
+ {
+ range = {
+ ['start'] = {
+ character = 85,
+ line = 1
+ },
+ ['end'] = {
+ character = 86,
+ line = 1
+ }
+ },
+ rangeLength = 1,
+ text = ''
+ }
+ }
+ local original_lines = {
+ "\\begin{document}",
+ "→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→→",
+ "\\end{document}",
+ }
+ test_edit(original_lines, {"jx"}, expected_text_changes, 'utf-16', '\n')
+ end)
+ it('deleting multiple lines containing multibyte characters', function()
local expected_text_changes = {
{
range = {
diff --git a/test/functional/plugin/lsp_spec.lua b/test/functional/plugin/lsp_spec.lua
index 228fc06e9b..b12d4227d5 100644
--- a/test/functional/plugin/lsp_spec.lua
+++ b/test/functional/plugin/lsp_spec.lua
@@ -66,7 +66,10 @@ local function fake_lsp_server_setup(test_name, timeout_ms, options)
end
end;
});
- root_dir = vim.loop.cwd();
+ workspace_folders = {{
+ uri = 'file://' .. vim.loop.cwd(),
+ name = 'test_folder',
+ }};
on_init = function(client, result)
TEST_RPC_CLIENT = client
vim.rpcrequest(1, "init", result)
@@ -153,7 +156,10 @@ describe('LSP', function()
"-c", string.format("lua TEST_NAME = %q", test_name),
"-c", "luafile "..fixture_filename;
};
- root_dir = vim.loop.cwd();
+ workspace_folders = {{
+ uri = 'file://' .. vim.loop.cwd(),
+ name = 'test_folder',
+ }};
}
end
TEST_CLIENT1 = test__start_client()