aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2023-05-22 10:19:47 +0200
committerGitHub <noreply@github.com>2023-05-22 10:19:47 +0200
commit62a80c36c158ecf4ffc8c93d8891aeb2f0d2f287 (patch)
tree49c5503fd1bd2a110bc19a96c156e7c31dafbaeb /test/functional/lua
parent8b8e60728486e1fbb308bee2961175be355e550a (diff)
parent576dddb46168e81aa0f78c28816082c662dedea1 (diff)
downloadrneovim-62a80c36c158ecf4ffc8c93d8891aeb2f0d2f287.tar.gz
rneovim-62a80c36c158ecf4ffc8c93d8891aeb2f0d2f287.tar.bz2
rneovim-62a80c36c158ecf4ffc8c93d8891aeb2f0d2f287.zip
Merge pull request #23712 from famiu/refactor/test/buf0
test: don't unnecessarily specify win/buf for nvim_(get|set)_option_value
Diffstat (limited to 'test/functional/lua')
-rw-r--r--test/functional/lua/buffer_updates_spec.lua8
-rw-r--r--test/functional/lua/filetype_spec.lua2
-rw-r--r--test/functional/lua/luaeval_spec.lua2
-rw-r--r--test/functional/lua/secure_spec.lua2
-rw-r--r--test/functional/lua/vim_spec.lua6
5 files changed, 10 insertions, 10 deletions
diff --git a/test/functional/lua/buffer_updates_spec.lua b/test/functional/lua/buffer_updates_spec.lua
index 64cb524e99..d415b708be 100644
--- a/test/functional/lua/buffer_updates_spec.lua
+++ b/test/functional/lua/buffer_updates_spec.lua
@@ -415,7 +415,7 @@ describe('lua: nvim_buf_attach on_bytes', function()
it('opening lines', function()
local check_events = setup_eventcheck(verify, origlines)
- -- meths.set_option_value('autoindent', true, { buf = 0 })
+ -- meths.set_option_value('autoindent', true, {})
feed 'Go'
check_events {
{ "test1", "bytes", 1, 4, 7, 0, 114, 0, 0, 0, 1, 0, 1 };
@@ -428,7 +428,7 @@ describe('lua: nvim_buf_attach on_bytes', function()
it('opening lines with autoindent', function()
local check_events = setup_eventcheck(verify, origlines)
- meths.set_option_value('autoindent', true, { buf = 0 })
+ meths.set_option_value('autoindent', true, {})
feed 'Go'
check_events {
{ "test1", "bytes", 1, 4, 7, 0, 114, 0, 0, 0, 1, 0, 5 };
@@ -462,8 +462,8 @@ describe('lua: nvim_buf_attach on_bytes', function()
it('continuing comments with fo=or', function()
local check_events = setup_eventcheck(verify, {'// Comment'})
- meths.set_option_value('formatoptions', 'ro', { buf = 0 })
- meths.set_option_value('filetype', 'c', { buf = 0 })
+ meths.set_option_value('formatoptions', 'ro', {})
+ meths.set_option_value('filetype', 'c', {})
feed 'A<CR>'
check_events {
{ "test1", "bytes", 1, 4, 0, 10, 10, 0, 0, 0, 1, 3, 4 };
diff --git a/test/functional/lua/filetype_spec.lua b/test/functional/lua/filetype_spec.lua
index 4ea94796bc..b3d95e1c7f 100644
--- a/test/functional/lua/filetype_spec.lua
+++ b/test/functional/lua/filetype_spec.lua
@@ -134,6 +134,6 @@ end)
describe('filetype.lua', function()
it('does not override user autocommands that set filetype #20333', function()
clear({args={'--clean', '--cmd', 'autocmd BufRead *.md set filetype=notmarkdown', 'README.md'}})
- eq('notmarkdown', meths.get_option_value('filetype', { buf = 0 }))
+ eq('notmarkdown', meths.get_option_value('filetype', {}))
end)
end)
diff --git a/test/functional/lua/luaeval_spec.lua b/test/functional/lua/luaeval_spec.lua
index 31da5db1df..dfbd2fb18b 100644
--- a/test/functional/lua/luaeval_spec.lua
+++ b/test/functional/lua/luaeval_spec.lua
@@ -514,7 +514,7 @@ describe('v:lua', function()
[5] = {bold = true, foreground = Screen.colors.SeaGreen4},
})
screen:attach()
- meths.set_option_value('omnifunc', 'v:lua.mymod.omni', { buf = 0 })
+ meths.set_option_value('omnifunc', 'v:lua.mymod.omni', {})
feed('isome st<c-x><c-o>')
screen:expect{grid=[[
some stuff^ |
diff --git a/test/functional/lua/secure_spec.lua b/test/functional/lua/secure_spec.lua
index 9a6292a6c6..fc20a06390 100644
--- a/test/functional/lua/secure_spec.lua
+++ b/test/functional/lua/secure_spec.lua
@@ -160,7 +160,7 @@ describe('vim.secure', function()
-- Cannot write file
pcall_err(command, 'write')
- eq(true, meths.get_option_value('readonly', {buf=0}))
+ eq(true, meths.get_option_value('readonly', {}))
end)
end)
diff --git a/test/functional/lua/vim_spec.lua b/test/functional/lua/vim_spec.lua
index 9a7654d610..978a4fe0b6 100644
--- a/test/functional/lua/vim_spec.lua
+++ b/test/functional/lua/vim_spec.lua
@@ -1496,7 +1496,7 @@ describe('lua stdlib', function()
it('vim.bo', function()
eq('', funcs.luaeval "vim.bo.filetype")
exec_lua [[
- vim.api.nvim_set_option_value("filetype", "markdown", {buf = 0})
+ vim.api.nvim_set_option_value("filetype", "markdown", {})
BUF = vim.api.nvim_create_buf(false, true)
vim.api.nvim_set_option_value("modifiable", false, {buf = BUF})
]]
@@ -1519,9 +1519,9 @@ describe('lua stdlib', function()
it('vim.wo', function()
exec_lua [[
- vim.api.nvim_set_option_value("cole", 2, {win=0})
+ vim.api.nvim_set_option_value("cole", 2, {})
vim.cmd "split"
- vim.api.nvim_set_option_value("cole", 2, {win=0})
+ vim.api.nvim_set_option_value("cole", 2, {})
]]
eq(2, funcs.luaeval "vim.wo.cole")
exec_lua [[