aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal/window_split_tab_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/terminal/window_split_tab_spec.lua')
-rw-r--r--test/functional/terminal/window_split_tab_spec.lua38
1 files changed, 13 insertions, 25 deletions
diff --git a/test/functional/terminal/window_split_tab_spec.lua b/test/functional/terminal/window_split_tab_spec.lua
index da14531fa2..17411e2724 100644
--- a/test/functional/terminal/window_split_tab_spec.lua
+++ b/test/functional/terminal/window_split_tab_spec.lua
@@ -7,8 +7,8 @@ local feed_command = helpers.feed_command
local command = helpers.command
local eq = helpers.eq
local eval = helpers.eval
-local meths = helpers.meths
-local sleep = helpers.sleep
+local api = helpers.api
+local sleep = vim.uv.sleep
local retry = helpers.retry
local is_os = helpers.is_os
@@ -19,7 +19,7 @@ describe(':terminal', function()
clear()
-- set the statusline to a constant value because of variables like pid
-- and current directory and to improve visibility of splits
- meths.set_option_value('statusline', '==========', {})
+ api.nvim_set_option_value('statusline', '==========', {})
command('highlight StatusLine cterm=NONE')
command('highlight StatusLineNC cterm=NONE')
command('highlight VertSplit cterm=NONE')
@@ -35,7 +35,7 @@ describe(':terminal', function()
command('terminal')
command('vsplit foo')
eq(3, eval("winnr('$')"))
- feed('ZQ') -- Close split, should not crash. #7538
+ feed('ZQ') -- Close split, should not crash. #7538
assert_alive()
end)
@@ -50,8 +50,7 @@ describe(':terminal', function()
tty ready |
rows: 5, cols: 50 |
{2: } |
- |
- |
+ |*2
========== |
:2split |
]])
@@ -63,31 +62,23 @@ describe(':terminal', function()
^tty ready |
rows: 5, cols: 50 |
{2: } |
- |
- |
+ |*2
========== |
:wincmd p |
]])
end)
it('does not change size if updated when not visible in any window #19665', function()
- local channel = meths.get_option_value('channel', {})
+ local channel = api.nvim_get_option_value('channel', {})
command('enew')
sleep(100)
- meths.chan_send(channel, 'foo')
+ api.nvim_chan_send(channel, 'foo')
sleep(100)
command('bprevious')
screen:expect([[
tty ready |
^foo{2: } |
- |
- |
- |
- |
- |
- |
- |
- |
+ |*8
]])
end)
@@ -100,9 +91,9 @@ describe(':terminal', function()
-- win: SIGWINCH is unreliable, use a weaker test. #7506
retry(3, 30000, function()
screen:try_resize(w1, h1)
- screen:expect{any='rows: 7, cols: 47'}
+ screen:expect { any = 'rows: 7, cols: 47' }
screen:try_resize(w2, h2)
- screen:expect{any='rows: 4, cols: 41'}
+ screen:expect { any = 'rows: 4, cols: 41' }
end)
return
end
@@ -112,9 +103,7 @@ describe(':terminal', function()
tty ready |
rows: 7, cols: 47 |
{2: } |
- |
- |
- |
+ |*3
^ |
|
]])
@@ -133,8 +122,7 @@ describe(':terminal', function()
command('split')
command('terminal')
feed('a<Cmd>wincmd j<CR>')
- eq(2, eval("winnr()"))
+ eq(2, eval('winnr()'))
eq('t', eval('mode(1)'))
end)
-
end)