aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/window_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/api/window_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/api/window_spec.lua')
-rw-r--r--test/functional/api/window_spec.lua10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/functional/api/window_spec.lua b/test/functional/api/window_spec.lua
index 11755a9d97..4d2ffa316a 100644
--- a/test/functional/api/window_spec.lua
+++ b/test/functional/api/window_spec.lua
@@ -222,9 +222,9 @@ describe('API/win', function()
eq('', nvim('get_option', 'statusline'))
command("set modified")
command("enew") -- global-local: not preserved in new buffer
- eq("Failed to get value for option 'statusline'",
- pcall_err(curwin, 'get_option', 'statusline'))
- eq('', eval('&l:statusline')) -- confirm local value was not copied
+ -- confirm local value was not copied
+ eq('', curwin('get_option', 'statusline'))
+ eq('', eval('&l:statusline'))
end)
it('after switching windows #15390', function()
@@ -238,6 +238,10 @@ describe('API/win', function()
eq('window-status', window('get_option', win1, 'statusline'))
assert_alive()
end)
+
+ it('returns values for unset local options', function()
+ eq(-1, curwin('get_option', 'scrolloff'))
+ end)
end)
describe('get_position', function()