aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/functional/fixtures/fake-lsp-server.lua37
1 files changed, 21 insertions, 16 deletions
diff --git a/test/functional/fixtures/fake-lsp-server.lua b/test/functional/fixtures/fake-lsp-server.lua
index db0c8c0c3f..dbb66a42e8 100644
--- a/test/functional/fixtures/fake-lsp-server.lua
+++ b/test/functional/fixtures/fake-lsp-server.lua
@@ -272,6 +272,7 @@ function tests.text_document_save_did_open()
end;
body = function()
notify('start')
+ expect_notification('textDocument/didClose')
expect_notification('textDocument/didOpen')
expect_notification('textDocument/didSave')
notify('shutdown')
@@ -292,6 +293,8 @@ function tests.text_document_sync_save_bool()
end;
body = function()
notify('start')
+ expect_notification('textDocument/didClose')
+ expect_notification('textDocument/didOpen')
expect_notification('textDocument/didSave', {textDocument = { uri = "file://" }})
notify('shutdown')
end;
@@ -313,6 +316,8 @@ function tests.text_document_sync_save_includeText()
end;
body = function()
notify('start')
+ expect_notification('textDocument/didClose')
+ expect_notification('textDocument/didOpen')
expect_notification('textDocument/didSave', {
textDocument = {
uri = "file://"
@@ -459,7 +464,7 @@ function tests.basic_check_buffer_open()
textDocument = {
languageId = "";
text = table.concat({"testing"; "123"}, "\n") .. '\n';
- uri = "file://";
+ uri = "buffer://";
version = 0;
};
})
@@ -486,13 +491,13 @@ function tests.basic_check_buffer_open_and_change()
textDocument = {
languageId = "";
text = table.concat({"testing"; "123"}, "\n") .. '\n';
- uri = "file://";
+ uri = "buffer://";
version = 0;
};
})
expect_notification('textDocument/didChange', {
textDocument = {
- uri = "file://";
+ uri = "buffer://";
version = 3;
};
contentChanges = {
@@ -522,13 +527,13 @@ function tests.basic_check_buffer_open_and_change_noeol()
textDocument = {
languageId = "";
text = table.concat({"testing"; "123"}, "\n");
- uri = "file://";
+ uri = "buffer://";
version = 0;
};
})
expect_notification('textDocument/didChange', {
textDocument = {
- uri = "file://";
+ uri = "buffer://";
version = 3;
};
contentChanges = {
@@ -557,13 +562,13 @@ function tests.basic_check_buffer_open_and_change_multi()
textDocument = {
languageId = "";
text = table.concat({"testing"; "123"}, "\n") .. '\n';
- uri = "file://";
+ uri = "buffer://";
version = 0;
};
})
expect_notification('textDocument/didChange', {
textDocument = {
- uri = "file://";
+ uri = "buffer://";
version = 3;
};
contentChanges = {
@@ -572,7 +577,7 @@ function tests.basic_check_buffer_open_and_change_multi()
})
expect_notification('textDocument/didChange', {
textDocument = {
- uri = "file://";
+ uri = "buffer://";
version = 4;
};
contentChanges = {
@@ -602,13 +607,13 @@ function tests.basic_check_buffer_open_and_change_multi_and_close()
textDocument = {
languageId = "";
text = table.concat({"testing"; "123"}, "\n") .. '\n';
- uri = "file://";
+ uri = "buffer://";
version = 0;
};
})
expect_notification('textDocument/didChange', {
textDocument = {
- uri = "file://";
+ uri = "buffer://";
version = 3;
};
contentChanges = {
@@ -617,7 +622,7 @@ function tests.basic_check_buffer_open_and_change_multi_and_close()
})
expect_notification('textDocument/didChange', {
textDocument = {
- uri = "file://";
+ uri = "buffer://";
version = 4;
};
contentChanges = {
@@ -626,7 +631,7 @@ function tests.basic_check_buffer_open_and_change_multi_and_close()
})
expect_notification('textDocument/didClose', {
textDocument = {
- uri = "file://";
+ uri = "buffer://";
};
})
expect_notification("finish")
@@ -660,13 +665,13 @@ function tests.basic_check_buffer_open_and_change_incremental()
textDocument = {
languageId = "";
text = table.concat({"testing"; "123"}, "\n") .. '\n';
- uri = "file://";
+ uri = "buffer://";
version = 0;
};
})
expect_notification('textDocument/didChange', {
textDocument = {
- uri = "file://";
+ uri = "buffer://";
version = 3;
};
contentChanges = {
@@ -703,13 +708,13 @@ function tests.basic_check_buffer_open_and_change_incremental_editing()
textDocument = {
languageId = "";
text = table.concat({"testing"; "123"}, "\n");
- uri = "file://";
+ uri = "buffer://";
version = 0;
};
})
expect_notification('textDocument/didChange', {
textDocument = {
- uri = "file://";
+ uri = "buffer://";
version = 3;
};
contentChanges = {