aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/terminal')
-rw-r--r--test/functional/terminal/buffer_spec.lua19
-rw-r--r--test/functional/terminal/tui_spec.lua6
2 files changed, 21 insertions, 4 deletions
diff --git a/test/functional/terminal/buffer_spec.lua b/test/functional/terminal/buffer_spec.lua
index 7560b0e872..d40baca871 100644
--- a/test/functional/terminal/buffer_spec.lua
+++ b/test/functional/terminal/buffer_spec.lua
@@ -5,6 +5,7 @@ local wait = helpers.wait
local eval, feed_command, source = helpers.eval, helpers.feed_command, helpers.source
local eq, neq = helpers.eq, helpers.neq
local write_file = helpers.write_file
+local command= helpers.command
describe(':terminal buffer', function()
local screen
@@ -59,7 +60,7 @@ describe(':terminal buffer', function()
end)
it('does not create swap files', function()
- local swapfile = nvim('command_output', 'swapname'):gsub('\n', '')
+ local swapfile = nvim('exec', 'swapname', true):gsub('\n', '')
eq(nil, io.open(swapfile))
end)
@@ -224,6 +225,22 @@ describe(':terminal buffer', function()
neq('terminal', eval('&buftype'))
end)
end)
+
+ it('it works with set rightleft #11438', function()
+ local columns = eval('&columns')
+ feed(string.rep('a', columns))
+ command('set rightleft')
+ screen:expect([[
+ ydaer ytt|
+ {1:a}aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa|
+ |
+ |
+ |
+ |
+ {3:-- TERMINAL --} |
+ ]])
+ command('bdelete!')
+ end)
end)
describe('No heap-buffer-overflow when using', function()
diff --git a/test/functional/terminal/tui_spec.lua b/test/functional/terminal/tui_spec.lua
index 676d6ef76d..077e9dc7d5 100644
--- a/test/functional/terminal/tui_spec.lua
+++ b/test/functional/terminal/tui_spec.lua
@@ -486,7 +486,7 @@ describe('TUI', function()
end)
it('paste: recovers from vim.paste() failure', function()
- child_session:request('nvim_execute_lua', [[
+ child_session:request('nvim_exec_lua', [[
_G.save_paste_fn = vim.paste
vim.paste = function(lines, phase) error("fake fail") end
]], {})
@@ -544,7 +544,7 @@ describe('TUI', function()
{3:-- TERMINAL --} |
]]}
-- Paste works if vim.paste() succeeds.
- child_session:request('nvim_execute_lua', [[
+ child_session:request('nvim_exec_lua', [[
vim.paste = _G.save_paste_fn
]], {})
feed_data('\027[200~line A\nline B\n\027[201~')
@@ -563,7 +563,7 @@ describe('TUI', function()
it('paste: vim.paste() cancel (retval=false) #10865', function()
-- This test only exercises the "cancel" case. Use-case would be "dangling
-- paste", but that is not implemented yet. #10865
- child_session:request('nvim_execute_lua', [[
+ child_session:request('nvim_exec_lua', [[
vim.paste = function(lines, phase) return false end
]], {})
feed_data('\027[200~line A\nline B\n\027[201~')