diff options
author | TJ DeVries <devries.timothyj@gmail.com> | 2021-06-11 12:28:15 -0400 |
---|---|---|
committer | TJ DeVries <devries.timothyj@gmail.com> | 2021-06-29 08:42:07 -0400 |
commit | 9119ea1becd5024ad14db04e2868feeae7c7d4de (patch) | |
tree | 9feda7543dabc43d7bec1ba01da46fec2d76de53 /test/functional/lua/vim_spec.lua | |
parent | b02e64c4dffd9044ea83e3f2d74b5f6db6bf6b99 (diff) | |
download | rneovim-9119ea1becd5024ad14db04e2868feeae7c7d4de.tar.gz rneovim-9119ea1becd5024ad14db04e2868feeae7c7d4de.tar.bz2 rneovim-9119ea1becd5024ad14db04e2868feeae7c7d4de.zip |
fix(vim.opt): Fix #14669 whichwrap now acts as expected
Diffstat (limited to 'test/functional/lua/vim_spec.lua')
-rw-r--r-- | test/functional/lua/vim_spec.lua | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/test/functional/lua/vim_spec.lua b/test/functional/lua/vim_spec.lua index e3d19008cc..cb94004872 100644 --- a/test/functional/lua/vim_spec.lua +++ b/test/functional/lua/vim_spec.lua @@ -1314,6 +1314,22 @@ describe('lua stdlib', function() eq("*.c", wildignore[1]) end) + it('should work for options that are both commalist and flaglist', function() + local result = exec_lua [[ + vim.opt.whichwrap = "b,s" + return vim.opt.whichwrap:get() + ]] + + eq({b = true, s = true}, result) + + result = exec_lua [[ + vim.opt.whichwrap = { b = true, s = false, h = true } + return vim.opt.whichwrap:get() + ]] + + eq({b = true, h = true}, result) + end) + it('should work for key-value pair options', function() local listchars = exec_lua [[ vim.opt.listchars = "tab:>~,space:_" @@ -1695,7 +1711,8 @@ describe('lua stdlib', function() } return vim.go.whichwrap ]] - eq(true, ww == "bs" or ww == "sb") + + eq(ww, "b,s") eq("b,s,<,>,[,]", exec_lua [[ vim.opt.whichwrap = "b,s,<,>,[,]" return vim.go.whichwrap |