commit 43a7945f1b483d121e76ea7495d1dabc773935ea
parent 7a5effb0f95e295c265fe09e7414d859a6d79657
Author: Famiu Haque <famiuhaque@proton.me>
Date: Sat, 28 Oct 2023 22:51:07 +0600
test: add test coverage for #25741
Diffstat:
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua
@@ -1477,14 +1477,6 @@ describe('API', function()
nvim('set_option_value', 'debug', 'beep', {})
eq(true, nvim('get_option_info2', 'debug', {}).was_set)
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()
eq("Invalid 'scope': expected 'local' or 'global'",
@@ -1616,6 +1608,15 @@ describe('API', function()
pcall_err(nvim, 'get_option_value', 'commentstring', { filetype = 'lua' }))
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)
describe('nvim_{get,set}_current_buf, nvim_list_bufs', function()