aboutsummaryrefslogtreecommitdiff
path: root/test/functional/vimscript/api_functions_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/vimscript/api_functions_spec.lua')
-rw-r--r--test/functional/vimscript/api_functions_spec.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/vimscript/api_functions_spec.lua b/test/functional/vimscript/api_functions_spec.lua
index 200ad40c3a..4985768bb0 100644
--- a/test/functional/vimscript/api_functions_spec.lua
+++ b/test/functional/vimscript/api_functions_spec.lua
@@ -3,6 +3,7 @@ local Screen = require('test.functional.ui.screen')
local neq, eq, command = helpers.neq, helpers.eq, helpers.command
local clear = helpers.clear
local exc_exec, expect, eval = helpers.exc_exec, helpers.expect, helpers.eval
+local exec_lua = helpers.exec_lua
local insert, pcall_err = helpers.insert, helpers.pcall_err
local matches = helpers.matches
local api = helpers.api
@@ -106,6 +107,19 @@ describe('eval-API', function()
pcall_err(api.nvim_open_term, 0, {})
)
+ matches(
+ 'E11: Invalid in command%-line window; <CR> executes, CTRL%-C quits$',
+ pcall_err(
+ exec_lua,
+ [[
+ local cmdwin_buf = vim.api.nvim_get_current_buf()
+ vim.api.nvim_buf_call(vim.api.nvim_create_buf(false, true), function()
+ vim.api.nvim_open_term(cmdwin_buf, {})
+ end)
+ ]]
+ )
+ )
+
-- But turning a different buffer into a terminal from the cmdwin is OK.
local term_buf = api.nvim_create_buf(false, true)
api.nvim_open_term(term_buf, {})