mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
Merge pull request #25812 from famiu/test/api/option_value/modified
test: add test coverage for #25741
This commit is contained in:
commit
c5f2472661
@ -1477,14 +1477,6 @@ describe('API', function()
|
|||||||
nvim('set_option_value', 'debug', 'beep', {})
|
nvim('set_option_value', 'debug', 'beep', {})
|
||||||
eq(true, nvim('get_option_info2', 'debug', {}).was_set)
|
eq(true, nvim('get_option_info2', 'debug', {}).was_set)
|
||||||
end)
|
end)
|
||||||
end)
|
|
||||||
|
|
||||||
describe('nvim_get_option_value, nvim_set_option_value', function()
|
|
||||||
it('works', function()
|
|
||||||
ok(nvim('get_option_value', 'equalalways', {}))
|
|
||||||
nvim('set_option_value', 'equalalways', false, {})
|
|
||||||
ok(not nvim('get_option_value', 'equalalways', {}))
|
|
||||||
end)
|
|
||||||
|
|
||||||
it('validation', function()
|
it('validation', function()
|
||||||
eq("Invalid 'scope': expected 'local' or 'global'",
|
eq("Invalid 'scope': expected 'local' or 'global'",
|
||||||
@ -1616,6 +1608,15 @@ describe('API', function()
|
|||||||
pcall_err(nvim, 'get_option_value', 'commentstring', { filetype = 'lua' }))
|
pcall_err(nvim, 'get_option_value', 'commentstring', { filetype = 'lua' }))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
it("value of 'modified' is always false for scratch buffers", function()
|
||||||
|
nvim('set_current_buf', nvim('create_buf', true, true))
|
||||||
|
insert([[
|
||||||
|
foo
|
||||||
|
bar
|
||||||
|
baz
|
||||||
|
]])
|
||||||
|
eq(false, nvim('get_option_value', 'modified', {}))
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
describe('nvim_{get,set}_current_buf, nvim_list_bufs', function()
|
describe('nvim_{get,set}_current_buf, nvim_list_bufs', function()
|
||||||
|
Loading…
Reference in New Issue
Block a user