aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/vim_spec.lua
diff options
context:
space:
mode:
authorGregory Anders <8965202+gpanders@users.noreply.github.com>2021-12-04 14:30:27 -0700
committerGitHub <noreply@github.com>2021-12-04 14:30:27 -0700
commit1e6eeca9d1360554ee18525603e83c3a1999a622 (patch)
tree74bdad7d2506a0a93d112230fe9c3bf1f8652675 /test/functional/lua/vim_spec.lua
parent222ef0c00d97aa2d5e17ca6b14aea037155595ee (diff)
parent71ac00ccb523383411b907b5fdf00a376e24a6f0 (diff)
downloadrneovim-1e6eeca9d1360554ee18525603e83c3a1999a622.tar.gz
rneovim-1e6eeca9d1360554ee18525603e83c3a1999a622.tar.bz2
rneovim-1e6eeca9d1360554ee18525603e83c3a1999a622.zip
Merge pull request #15996 from gpanders/nvim_get_option_value
feat(api): add nvim_{get,set}_option_value
Diffstat (limited to 'test/functional/lua/vim_spec.lua')
-rw-r--r--test/functional/lua/vim_spec.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/lua/vim_spec.lua b/test/functional/lua/vim_spec.lua
index 28471bdd46..2515b37beb 100644
--- a/test/functional/lua/vim_spec.lua
+++ b/test/functional/lua/vim_spec.lua
@@ -1240,7 +1240,7 @@ describe('lua stdlib', function()
vim.opt.makeprg = "global-local"
table.insert(result, vim.api.nvim_get_option('makeprg'))
- table.insert(result, (pcall(vim.api.nvim_buf_get_option, 0, 'makeprg')))
+ table.insert(result, vim.api.nvim_buf_get_option(0, 'makeprg'))
vim.opt_local.mp = "only-local"
table.insert(result, vim.api.nvim_get_option('makeprg'))
@@ -1258,7 +1258,7 @@ describe('lua stdlib', function()
-- Set -> global & local
eq("global-local", result[1])
- eq(false, result[2])
+ eq("", result[2])
-- Setlocal -> only local
eq("global-local", result[3])
@@ -1268,9 +1268,9 @@ describe('lua stdlib', function()
eq("only-global", result[5])
eq("only-local", result[6])
- -- set -> doesn't override previously set value
+ -- Set -> sets global value and resets local value
eq("global-local", result[7])
- eq("only-local", result[8])
+ eq("", result[8])
end)
it('should allow you to retrieve window opts even if they have not been set', function()