aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/vim_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/lua/vim_spec.lua')
-rw-r--r--test/functional/lua/vim_spec.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/functional/lua/vim_spec.lua b/test/functional/lua/vim_spec.lua
index 51a0b58172..890f6427bb 100644
--- a/test/functional/lua/vim_spec.lua
+++ b/test/functional/lua/vim_spec.lua
@@ -1228,6 +1228,21 @@ describe('lua stdlib', function()
eq("only-local", result[8])
end)
+ it('should allow you to retrieve window opts even if they have not been set', function()
+ local result = exec_lua [[
+ local result = {}
+ table.insert(result, vim.opt.number:get())
+ table.insert(result, vim.opt_local.number:get())
+
+ vim.opt_local.number = true
+ table.insert(result, vim.opt.number:get())
+ table.insert(result, vim.opt_local.number:get())
+
+ return result
+ ]]
+ eq({false, false, true, true}, result)
+ end)
+
it('should allow all sorts of string manipulation', function()
eq({'hello', 'hello world', 'start hello world'}, exec_lua [[
local results = {}