aboutsummaryrefslogtreecommitdiff
path: root/test/functional/core/remote_spec.lua
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2024-01-12 17:59:57 +0000
committerLewis Russell <lewis6991@gmail.com>2024-01-12 18:59:14 +0000
commit795f896a5772d5e0795f86642bdf90c82efac45c (patch)
tree308f04fbee18d2ec3f00c12a8bec96b84d8907f0 /test/functional/core/remote_spec.lua
parent4f81f506f96f8b5bfcf00e952ceb492d3ce9dc6e (diff)
downloadrneovim-795f896a5772d5e0795f86642bdf90c82efac45c.tar.gz
rneovim-795f896a5772d5e0795f86642bdf90c82efac45c.tar.bz2
rneovim-795f896a5772d5e0795f86642bdf90c82efac45c.zip
test: rename (meths, funcs) -> (api, fn)
Diffstat (limited to 'test/functional/core/remote_spec.lua')
-rw-r--r--test/functional/core/remote_spec.lua22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/functional/core/remote_spec.lua b/test/functional/core/remote_spec.lua
index 5eb520ef4f..a48534f51b 100644
--- a/test/functional/core/remote_spec.lua
+++ b/test/functional/core/remote_spec.lua
@@ -6,7 +6,7 @@ local eq = helpers.eq
local exec_capture = helpers.exec_capture
local exec_lua = helpers.exec_lua
local expect = helpers.expect
-local funcs = helpers.funcs
+local fn = helpers.fn
local insert = helpers.insert
local nvim_prog = helpers.nvim_prog
local new_argv = helpers.new_argv
@@ -42,7 +42,7 @@ describe('Remote', function()
-- Run a `nvim --remote*` command and return { stdout, stderr } of the process
local function run_remote(...)
set_session(server)
- local addr = funcs.serverlist()[1]
+ local addr = fn.serverlist()[1]
-- Create an nvim instance just to run the remote-invoking nvim. We want
-- to wait for the remote instance to exit and calling jobwait blocks
@@ -81,20 +81,20 @@ describe('Remote', function()
it('edit a single file', function()
eq({ '', '' }, run_remote('--remote', fname))
expect(contents)
- eq(2, #funcs.getbufinfo())
+ eq(2, #fn.getbufinfo())
end)
it('tab edit a single file with a non-changed buffer', function()
eq({ '', '' }, run_remote('--remote-tab', fname))
expect(contents)
- eq(1, #funcs.gettabinfo())
+ eq(1, #fn.gettabinfo())
end)
it('tab edit a single file with a changed buffer', function()
insert('hello')
eq({ '', '' }, run_remote('--remote-tab', fname))
expect(contents)
- eq(2, #funcs.gettabinfo())
+ eq(2, #fn.gettabinfo())
end)
it('edit multiple files', function()
@@ -102,15 +102,15 @@ describe('Remote', function()
expect(contents)
command('next')
expect(other_contents)
- eq(3, #funcs.getbufinfo())
+ eq(3, #fn.getbufinfo())
end)
it('send keys', function()
eq({ '', '' }, run_remote('--remote-send', ':edit ' .. fname .. '<CR><C-W>v'))
expect(contents)
- eq(2, #funcs.getwininfo())
+ eq(2, #fn.getwininfo())
-- Only a single buffer as we're using edit and not drop like --remote does
- eq(1, #funcs.getbufinfo())
+ eq(1, #fn.getbufinfo())
end)
it('evaluate expressions', function()
@@ -127,7 +127,7 @@ describe('Remote', function()
it('creates server if not found', function()
clear('--remote', fname)
expect(contents)
- eq(1, #funcs.getbufinfo())
+ eq(1, #fn.getbufinfo())
-- Since we didn't pass silent, we should get a complaint
neq(nil, string.find(exec_capture('messages'), 'E247:'))
end)
@@ -135,8 +135,8 @@ describe('Remote', function()
it('creates server if not found with tabs', function()
clear('--remote-tab-silent', fname, other_fname)
expect(contents)
- eq(2, #funcs.gettabinfo())
- eq(2, #funcs.getbufinfo())
+ eq(2, #fn.gettabinfo())
+ eq(2, #fn.getbufinfo())
-- We passed silent, so no message should be issued about the server not being found
eq(nil, string.find(exec_capture('messages'), 'E247:'))
end)