aboutsummaryrefslogtreecommitdiff
path: root/test/functional/terminal/edit_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/terminal/edit_spec.lua')
-rw-r--r--test/functional/terminal/edit_spec.lua20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/functional/terminal/edit_spec.lua b/test/functional/terminal/edit_spec.lua
index 754a681cff..f7ceb0a68b 100644
--- a/test/functional/terminal/edit_spec.lua
+++ b/test/functional/terminal/edit_spec.lua
@@ -3,8 +3,8 @@ local screen = require('test.functional.ui.screen')
local testprg = helpers.testprg
local command = helpers.command
-local funcs = helpers.funcs
-local meths = helpers.meths
+local fn = helpers.fn
+local api = helpers.api
local clear = helpers.clear
local eq = helpers.eq
local matches = helpers.matches
@@ -19,17 +19,17 @@ describe(':edit term://*', function()
before_each(function()
clear()
- meths.nvim_set_option_value('shell', testprg('shell-test'), {})
- meths.nvim_set_option_value('shellcmdflag', 'EXE', {})
+ api.nvim_set_option_value('shell', testprg('shell-test'), {})
+ api.nvim_set_option_value('shellcmdflag', 'EXE', {})
end)
it('runs TermOpen event', function()
- meths.nvim_set_var('termopen_runs', {})
+ api.nvim_set_var('termopen_runs', {})
command('autocmd TermOpen * :call add(g:termopen_runs, expand("<amatch>"))')
command('edit term://')
- local termopen_runs = meths.nvim_get_var('termopen_runs')
+ local termopen_runs = api.nvim_get_var('termopen_runs')
eq(1, #termopen_runs)
- local cwd = funcs.fnamemodify('.', ':p:~'):gsub([[[\/]*$]], '')
+ local cwd = fn.fnamemodify('.', ':p:~'):gsub([[[\/]*$]], '')
matches('^term://' .. pesc(cwd) .. '//%d+:$', termopen_runs[1])
end)
@@ -37,7 +37,7 @@ describe(':edit term://*', function()
local columns, lines = 20, 4
local scr = get_screen(columns, lines)
local rep = 97
- meths.nvim_set_option_value('shellcmdflag', 'REP ' .. rep, {})
+ api.nvim_set_option_value('shellcmdflag', 'REP ' .. rep, {})
command('set shellxquote=') -- win: avoid extra quotes
local sb = 10
command(
@@ -46,7 +46,7 @@ describe(':edit term://*', function()
command('edit term://foobar')
local bufcontents = {}
- local winheight = meths.nvim_win_get_height(0)
+ local winheight = api.nvim_win_get_height(0)
local buf_cont_start = rep - sb - winheight + 2
for i = buf_cont_start, (rep - 1) do
bufcontents[#bufcontents + 1] = ('%d: foobar'):format(i)
@@ -63,6 +63,6 @@ describe(':edit term://*', function()
exp_screen = exp_screen .. (' '):rep(columns) .. '|\n'
scr:expect(exp_screen)
- eq(bufcontents, meths.nvim_buf_get_lines(0, 0, -1, true))
+ eq(bufcontents, api.nvim_buf_get_lines(0, 0, -1, true))
end)
end)