mirror of
https://github.com/neovim/neovim.git
synced 2025-11-14 22:39:08 +00:00
test: typing for helpers.meths
This commit is contained in:
@@ -43,12 +43,12 @@ end)
|
||||
describe(':ruby command', function()
|
||||
it('evaluates ruby', function()
|
||||
command('ruby VIM.command("let g:set_by_ruby = [100, 0]")')
|
||||
eq({ 100, 0 }, meths.get_var('set_by_ruby'))
|
||||
eq({ 100, 0 }, meths.nvim_get_var('set_by_ruby'))
|
||||
end)
|
||||
|
||||
it('supports nesting', function()
|
||||
command([[ruby VIM.command('ruby VIM.command("let set_by_nested_ruby = 555")')]])
|
||||
eq(555, meths.get_var('set_by_nested_ruby'))
|
||||
eq(555, meths.nvim_get_var('set_by_nested_ruby'))
|
||||
end)
|
||||
end)
|
||||
|
||||
@@ -57,7 +57,7 @@ describe(':rubyfile command', function()
|
||||
local fname = 'rubyfile.rb'
|
||||
write_file(fname, 'VIM.command("let set_by_rubyfile = 123")')
|
||||
command('rubyfile rubyfile.rb')
|
||||
eq(123, meths.get_var('set_by_rubyfile'))
|
||||
eq(123, meths.nvim_get_var('set_by_rubyfile'))
|
||||
os.remove(fname)
|
||||
end)
|
||||
end)
|
||||
@@ -97,7 +97,7 @@ describe(':rubydo command', function()
|
||||
|
||||
it('does not modify the buffer if no changes are made', function()
|
||||
command('normal :rubydo 42')
|
||||
eq(false, meths.get_option_value('modified', {}))
|
||||
eq(false, meths.nvim_get_option_value('modified', {}))
|
||||
end)
|
||||
end)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user