diff options
author | notomo <notomo.motono@gmail.com> | 2022-07-25 10:43:39 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-25 09:43:39 +0800 |
commit | 46e3e1c7280a409462cceb520fe12259b5ba9937 (patch) | |
tree | a0fabe872ed7b4194ee6ed9551cc95d6e022cc07 /test/functional/api/vim_spec.lua | |
parent | d529523027c3d3c80c469fa689b0f65ec6f8298e (diff) | |
download | rneovim-46e3e1c7280a409462cceb520fe12259b5ba9937.tar.gz rneovim-46e3e1c7280a409462cceb520fe12259b5ba9937.tar.bz2 rneovim-46e3e1c7280a409462cceb520fe12259b5ba9937.zip |
fix(api): make nvim_cmd mods.silent work correctly (#19489)
Diffstat (limited to 'test/functional/api/vim_spec.lua')
-rw-r--r-- | test/functional/api/vim_spec.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua index 3724dbf820..17de6730fb 100644 --- a/test/functional/api/vim_spec.lua +++ b/test/functional/api/vim_spec.lua @@ -3733,6 +3733,12 @@ describe('API', function() eq("", meths.cmd({ cmd = "Foo", bang = false }, { output = true })) end) it('works with modifiers', function() + -- with :silent output is still captured + eq('1', + meths.cmd({ cmd = 'echomsg', args = { '1' }, mods = { silent = true } }, + { output = true })) + -- with :silent message isn't added to message history + eq('', meths.cmd({ cmd = 'messages' }, { output = true })) meths.create_user_command("Foo", 'set verbose', {}) eq(" verbose=1", meths.cmd({ cmd = "Foo", mods = { verbose = 1 } }, { output = true })) eq(0, meths.get_option_value("verbose", {})) |