diff options
author | TJ DeVries <devries.timothyj@gmail.com> | 2021-06-11 13:39:59 -0400 |
---|---|---|
committer | TJ DeVries <devries.timothyj@gmail.com> | 2021-06-29 08:42:07 -0400 |
commit | 6ecec87c099ce6182b4a1cc81846be9e0e70c1cd (patch) | |
tree | e8f74f11e8d650030550bae587fe2c0b68352096 /test/functional/lua/vim_spec.lua | |
parent | 9119ea1becd5024ad14db04e2868feeae7c7d4de (diff) | |
download | rneovim-6ecec87c099ce6182b4a1cc81846be9e0e70c1cd.tar.gz rneovim-6ecec87c099ce6182b4a1cc81846be9e0e70c1cd.tar.bz2 rneovim-6ecec87c099ce6182b4a1cc81846be9e0e70c1cd.zip |
fix(vim.opt): Fix #14668 Now correctly handles unescaped commas in isfname style
Diffstat (limited to 'test/functional/lua/vim_spec.lua')
-rw-r--r-- | test/functional/lua/vim_spec.lua | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/functional/lua/vim_spec.lua b/test/functional/lua/vim_spec.lua index cb94004872..ad0bb50c6e 100644 --- a/test/functional/lua/vim_spec.lua +++ b/test/functional/lua/vim_spec.lua @@ -1731,6 +1731,26 @@ describe('lua stdlib', function() ]])) end) end) + + -- isfname=a,b,c,,,d,e,f + it('can handle isfname ,,,', function() + local result = exec_lua [[ + vim.opt.isfname = "a,b,,,c" + return { vim.opt.isfname:get(), vim.api.nvim_get_option('isfname') } + ]] + + eq({{",", "a", "b", "c"}, "a,b,,,c"}, result) + end) + + -- isfname=a,b,c,^,,def + it('can handle isfname ,^,,', function() + local result = exec_lua [[ + vim.opt.isfname = "a,b,^,,c" + return { vim.opt.isfname:get(), vim.api.nvim_get_option('isfname') } + ]] + + eq({{"^,", "a", "b", "c"}, "a,b,^,,c"}, result) + end) end) -- vim.opt it('vim.cmd', function() |