mirror of
https://github.com/neovim/neovim.git
synced 2026-04-21 14:55:33 +00:00
test: rename (meths, funcs) -> (api, fn)
This commit is contained in:
@@ -3,7 +3,7 @@ local command = helpers.command
|
||||
local insert = helpers.insert
|
||||
local eq = helpers.eq
|
||||
local clear = helpers.clear
|
||||
local meths = helpers.meths
|
||||
local api = helpers.api
|
||||
local feed = helpers.feed
|
||||
local feed_command = helpers.feed_command
|
||||
local write_file = helpers.write_file
|
||||
@@ -49,7 +49,7 @@ describe(':source', function()
|
||||
pending("'shellslash' only works on Windows")
|
||||
return
|
||||
end
|
||||
meths.nvim_set_option_value('shellslash', false, {})
|
||||
api.nvim_set_option_value('shellslash', false, {})
|
||||
mkdir('Xshellslash')
|
||||
|
||||
write_file(
|
||||
@@ -65,9 +65,9 @@ describe(':source', function()
|
||||
|
||||
for _ = 1, 2 do
|
||||
command([[source Xshellslash/Xstack.vim]])
|
||||
matches([[Xshellslash\Xstack%.vim]], meths.nvim_get_var('stack1'))
|
||||
matches([[Xshellslash/Xstack%.vim]], meths.nvim_get_var('stack2'))
|
||||
matches([[Xshellslash\Xstack%.vim]], meths.nvim_get_var('stack3'))
|
||||
matches([[Xshellslash\Xstack%.vim]], api.nvim_get_var('stack1'))
|
||||
matches([[Xshellslash/Xstack%.vim]], api.nvim_get_var('stack2'))
|
||||
matches([[Xshellslash\Xstack%.vim]], api.nvim_get_var('stack3'))
|
||||
end
|
||||
|
||||
write_file(
|
||||
@@ -83,9 +83,9 @@ describe(':source', function()
|
||||
|
||||
for _ = 1, 2 do
|
||||
command([[source Xshellslash/Xstack.lua]])
|
||||
matches([[Xshellslash\Xstack%.lua]], meths.nvim_get_var('stack1'))
|
||||
matches([[Xshellslash/Xstack%.lua]], meths.nvim_get_var('stack2'))
|
||||
matches([[Xshellslash\Xstack%.lua]], meths.nvim_get_var('stack3'))
|
||||
matches([[Xshellslash\Xstack%.lua]], api.nvim_get_var('stack1'))
|
||||
matches([[Xshellslash/Xstack%.lua]], api.nvim_get_var('stack2'))
|
||||
matches([[Xshellslash\Xstack%.lua]], api.nvim_get_var('stack3'))
|
||||
end
|
||||
|
||||
rmdir('Xshellslash')
|
||||
@@ -182,9 +182,9 @@ describe(':source', function()
|
||||
command('set shellslash')
|
||||
command('source ' .. test_file)
|
||||
eq(1, eval('g:sourced_lua'))
|
||||
matches([[/test%.lua$]], meths.nvim_get_var('sfile_value'))
|
||||
matches([[/test%.lua$]], meths.nvim_get_var('stack_value'))
|
||||
matches([[/test%.lua$]], meths.nvim_get_var('script_value'))
|
||||
matches([[/test%.lua$]], api.nvim_get_var('sfile_value'))
|
||||
matches([[/test%.lua$]], api.nvim_get_var('stack_value'))
|
||||
matches([[/test%.lua$]], api.nvim_get_var('script_value'))
|
||||
|
||||
os.remove(test_file)
|
||||
end)
|
||||
@@ -229,9 +229,9 @@ describe(':source', function()
|
||||
|
||||
eq(12, eval('g:c'))
|
||||
eq(' \\ 1\n "\\ 2', exec_lua('return _G.a'))
|
||||
eq(':source (no file)', meths.nvim_get_var('sfile_value'))
|
||||
eq(':source (no file)', meths.nvim_get_var('stack_value'))
|
||||
eq(':source (no file)', meths.nvim_get_var('script_value'))
|
||||
eq(':source (no file)', api.nvim_get_var('sfile_value'))
|
||||
eq(':source (no file)', api.nvim_get_var('stack_value'))
|
||||
eq(':source (no file)', api.nvim_get_var('script_value'))
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user