mirror of
https://github.com/neovim/neovim.git
synced 2025-11-17 15:51:32 +00:00
test: rename (meths, funcs) -> (api, fn)
This commit is contained in:
@@ -7,7 +7,7 @@ local matches = helpers.matches
|
||||
local feed = helpers.feed
|
||||
local eval = helpers.eval
|
||||
local clear = helpers.clear
|
||||
local funcs = helpers.funcs
|
||||
local fn = helpers.fn
|
||||
local nvim_prog_abs = helpers.nvim_prog_abs
|
||||
local write_file = helpers.write_file
|
||||
local is_os = helpers.is_os
|
||||
@@ -33,7 +33,7 @@ describe('command-line option', function()
|
||||
|
||||
it('treats - as stdin', function()
|
||||
eq(nil, uv.fs_stat(fname))
|
||||
funcs.system({
|
||||
fn.system({
|
||||
nvim_prog_abs(),
|
||||
'-u',
|
||||
'NONE',
|
||||
@@ -55,7 +55,7 @@ describe('command-line option', function()
|
||||
eq(nil, uv.fs_stat(fname))
|
||||
eq(true, not not dollar_fname:find('%$%w+'))
|
||||
write_file(dollar_fname, ':call setline(1, "100500")\n:wqall!\n')
|
||||
funcs.system({
|
||||
fn.system({
|
||||
nvim_prog_abs(),
|
||||
'-u',
|
||||
'NONE',
|
||||
@@ -91,7 +91,7 @@ describe('command-line option', function()
|
||||
|
||||
-- Need to explicitly pipe to stdin so that the embedded Nvim instance doesn't try to read
|
||||
-- data from the terminal #18181
|
||||
funcs.termopen(string.format([[echo "" | %s]], table.concat(args, ' ')), {
|
||||
fn.termopen(string.format([[echo "" | %s]], table.concat(args, ' ')), {
|
||||
env = { VIMRUNTIME = os.getenv('VIMRUNTIME') },
|
||||
})
|
||||
screen:expect(
|
||||
@@ -128,7 +128,7 @@ describe('command-line option', function()
|
||||
it('errors out when trying to use nonexistent file with -s', function()
|
||||
eq(
|
||||
'Cannot open for reading: "' .. nonexistent_fname .. '": no such file or directory\n',
|
||||
funcs.system({
|
||||
fn.system({
|
||||
nvim_prog_abs(),
|
||||
'-u',
|
||||
'NONE',
|
||||
@@ -151,7 +151,7 @@ describe('command-line option', function()
|
||||
write_file(dollar_fname, ':call setline(1, "2")\n:wqall!\n')
|
||||
eq(
|
||||
'Attempt to open script file again: "-s ' .. dollar_fname .. '"\n',
|
||||
funcs.system({
|
||||
fn.system({
|
||||
nvim_prog_abs(),
|
||||
'-u',
|
||||
'NONE',
|
||||
@@ -175,9 +175,9 @@ describe('command-line option', function()
|
||||
end)
|
||||
|
||||
it('nvim -v, :version', function()
|
||||
matches('Run ":verbose version"', funcs.execute(':version'))
|
||||
matches('Compilation: .*Run :checkhealth', funcs.execute(':verbose version'))
|
||||
matches('Run "nvim %-V1 %-v"', funcs.system({ nvim_prog_abs(), '-v' }))
|
||||
matches('Compilation: .*Run :checkhealth', funcs.system({ nvim_prog_abs(), '-V1', '-v' }))
|
||||
matches('Run ":verbose version"', fn.execute(':version'))
|
||||
matches('Compilation: .*Run :checkhealth', fn.execute(':verbose version'))
|
||||
matches('Run "nvim %-V1 %-v"', fn.system({ nvim_prog_abs(), '-v' }))
|
||||
matches('Compilation: .*Run :checkhealth', fn.system({ nvim_prog_abs(), '-V1', '-v' }))
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user