aboutsummaryrefslogtreecommitdiff
path: root/test/functional/fixtures
diff options
context:
space:
mode:
authorAshkan Kiani <ashkan.k.kiani@gmail.com>2019-11-21 10:04:32 -0800
committerAshkan Kiani <ashkan.k.kiani@gmail.com>2019-11-21 10:04:32 -0800
commit6a5140137865025dee68e75a4e8feb2d20a430cf (patch)
treebd9815ea488c4ee77bdfd6631ba7159f039ebe3e /test/functional/fixtures
parentb7170f2d722cee24a62eb74ac836d6192e5475dc (diff)
parentcc5487e32f6fc6d0034634a1f9e736968afb4450 (diff)
downloadrneovim-6a5140137865025dee68e75a4e8feb2d20a430cf.tar.gz
rneovim-6a5140137865025dee68e75a4e8feb2d20a430cf.tar.bz2
rneovim-6a5140137865025dee68e75a4e8feb2d20a430cf.zip
Merge remote-tracking branch 'origin/master' into lsp-followup
Diffstat (limited to 'test/functional/fixtures')
-rw-r--r--test/functional/fixtures/lsp-test-rpc-server.lua53
1 files changed, 44 insertions, 9 deletions
diff --git a/test/functional/fixtures/lsp-test-rpc-server.lua b/test/functional/fixtures/lsp-test-rpc-server.lua
index 971e61b072..798883ced0 100644
--- a/test/functional/fixtures/lsp-test-rpc-server.lua
+++ b/test/functional/fixtures/lsp-test-rpc-server.lua
@@ -170,7 +170,7 @@ function tests.basic_check_buffer_open()
expect_notification('textDocument/didOpen', {
textDocument = {
languageId = "";
- text = table.concat({"testing"; "123"}, "\n");
+ text = table.concat({"testing"; "123"}, "\n") .. '\n';
uri = "file://";
version = 0;
};
@@ -197,6 +197,42 @@ function tests.basic_check_buffer_open_and_change()
expect_notification('textDocument/didOpen', {
textDocument = {
languageId = "";
+ text = table.concat({"testing"; "123"}, "\n") .. '\n';
+ uri = "file://";
+ version = 0;
+ };
+ })
+ expect_notification('textDocument/didChange', {
+ textDocument = {
+ uri = "file://";
+ version = 3;
+ };
+ contentChanges = {
+ { text = table.concat({"testing"; "boop"}, "\n") .. '\n'; };
+ }
+ })
+ expect_notification("finish")
+ notify('finish')
+ end;
+ }
+end
+
+function tests.basic_check_buffer_open_and_change_noeol()
+ skeleton {
+ on_init = function(params)
+ local expected_capabilities = protocol.make_client_capabilities()
+ assert_eq(params.capabilities, expected_capabilities)
+ return {
+ capabilities = {
+ textDocumentSync = protocol.TextDocumentSyncKind.Full;
+ }
+ }
+ end;
+ body = function()
+ notify('start')
+ expect_notification('textDocument/didOpen', {
+ textDocument = {
+ languageId = "";
text = table.concat({"testing"; "123"}, "\n");
uri = "file://";
version = 0;
@@ -216,7 +252,6 @@ function tests.basic_check_buffer_open_and_change()
end;
}
end
-
function tests.basic_check_buffer_open_and_change_multi()
skeleton {
on_init = function(params)
@@ -233,7 +268,7 @@ function tests.basic_check_buffer_open_and_change_multi()
expect_notification('textDocument/didOpen', {
textDocument = {
languageId = "";
- text = table.concat({"testing"; "123"}, "\n");
+ text = table.concat({"testing"; "123"}, "\n") .. '\n';
uri = "file://";
version = 0;
};
@@ -244,7 +279,7 @@ function tests.basic_check_buffer_open_and_change_multi()
version = 3;
};
contentChanges = {
- { text = table.concat({"testing"; "321"}, "\n"); };
+ { text = table.concat({"testing"; "321"}, "\n") .. '\n'; };
}
})
expect_notification('textDocument/didChange', {
@@ -253,7 +288,7 @@ function tests.basic_check_buffer_open_and_change_multi()
version = 4;
};
contentChanges = {
- { text = table.concat({"testing"; "boop"}, "\n"); };
+ { text = table.concat({"testing"; "boop"}, "\n") .. '\n'; };
}
})
expect_notification("finish")
@@ -278,7 +313,7 @@ function tests.basic_check_buffer_open_and_change_multi_and_close()
expect_notification('textDocument/didOpen', {
textDocument = {
languageId = "";
- text = table.concat({"testing"; "123"}, "\n");
+ text = table.concat({"testing"; "123"}, "\n") .. '\n';
uri = "file://";
version = 0;
};
@@ -289,7 +324,7 @@ function tests.basic_check_buffer_open_and_change_multi_and_close()
version = 3;
};
contentChanges = {
- { text = table.concat({"testing"; "321"}, "\n"); };
+ { text = table.concat({"testing"; "321"}, "\n") .. '\n'; };
}
})
expect_notification('textDocument/didChange', {
@@ -298,7 +333,7 @@ function tests.basic_check_buffer_open_and_change_multi_and_close()
version = 4;
};
contentChanges = {
- { text = table.concat({"testing"; "boop"}, "\n"); };
+ { text = table.concat({"testing"; "boop"}, "\n") .. '\n'; };
}
})
expect_notification('textDocument/didClose', {
@@ -328,7 +363,7 @@ function tests.basic_check_buffer_open_and_change_incremental()
expect_notification('textDocument/didOpen', {
textDocument = {
languageId = "";
- text = table.concat({"testing"; "123"}, "\n");
+ text = table.concat({"testing"; "123"}, "\n") .. '\n';
uri = "file://";
version = 0;
};