aboutsummaryrefslogtreecommitdiff
path: root/test/functional/eval/api_functions_spec.lua
diff options
context:
space:
mode:
authornotomo <notomo.motono@gmail.com>2020-11-24 21:57:43 +0900
committernotomo <notomo.motono@gmail.com>2020-12-16 21:57:24 +0900
commit30ef8c693c08e0b507851b93c1905f0de86ad384 (patch)
treeafe61d81eca203100022d9e08d748e6c91b5568d /test/functional/eval/api_functions_spec.lua
parent93ba97779353a3556cee33de0b0ac65d0b0eb7df (diff)
downloadrneovim-30ef8c693c08e0b507851b93c1905f0de86ad384.tar.gz
rneovim-30ef8c693c08e0b507851b93c1905f0de86ad384.tar.bz2
rneovim-30ef8c693c08e0b507851b93c1905f0de86ad384.zip
test: textlock api error
Diffstat (limited to 'test/functional/eval/api_functions_spec.lua')
-rw-r--r--test/functional/eval/api_functions_spec.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/eval/api_functions_spec.lua b/test/functional/eval/api_functions_spec.lua
index ed110efeb4..7d09a652ba 100644
--- a/test/functional/eval/api_functions_spec.lua
+++ b/test/functional/eval/api_functions_spec.lua
@@ -47,6 +47,10 @@ describe('eval-API', function()
eq('Vim(call):E5555: API call: Invalid buffer id: 17', err)
end)
+ it('cannot change texts if textlocked', function()
+ command("autocmd TextYankPost <buffer> ++once call nvim_buf_set_lines(0, 0, -1, v:false, [])")
+ eq('Vim(call):E5555: API call: E523: Not allowed here', pcall_err(command, "normal! yy"))
+ end)
it("use buffer numbers and windows ids as handles", function()
local screen = Screen.new(40, 8)