diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-05-05 19:33:06 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-05 19:33:06 +0800 |
commit | d9f0d2da4d29847542072099f103e7248fcacaab (patch) | |
tree | 8f659e7b0380b57885b04782e01fb04a31918ef8 /test/functional/vimscript/execute_spec.lua | |
parent | 648f777931d49b8013146f69d7e2776f69c52900 (diff) | |
parent | 3a1e17e3a1767b4ff8a082150f7f9d6bda50cc8f (diff) | |
download | rneovim-d9f0d2da4d29847542072099f103e7248fcacaab.tar.gz rneovim-d9f0d2da4d29847542072099f103e7248fcacaab.tar.bz2 rneovim-d9f0d2da4d29847542072099f103e7248fcacaab.zip |
Merge pull request #23482 from zeertzjq/do-cmdline-verbose
fix(excmd): append original command to error message
Diffstat (limited to 'test/functional/vimscript/execute_spec.lua')
-rw-r--r-- | test/functional/vimscript/execute_spec.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/vimscript/execute_spec.lua b/test/functional/vimscript/execute_spec.lua index 17edf5c93e..a9a4ad4811 100644 --- a/test/functional/vimscript/execute_spec.lua +++ b/test/functional/vimscript/execute_spec.lua @@ -4,6 +4,7 @@ local eval = helpers.eval local clear = helpers.clear local source = helpers.source local exc_exec = helpers.exc_exec +local pcall_err = helpers.pcall_err local funcs = helpers.funcs local Screen = require('test.functional.ui.screen') local command = helpers.command @@ -284,6 +285,14 @@ describe('execute()', function() eq('42', eval('g:mes')) end) + it('gives E493 instead of prompting on backwards range for ""', function() + command('split') + eq('Vim(windo):E493: Backwards range given: 2,1windo echo', + pcall_err(funcs.execute, '2,1windo echo', '')) + eq('Vim(windo):E493: Backwards range given: 2,1windo echo', + pcall_err(funcs.execute, {'2,1windo echo'}, '')) + end) + it('captures but does not display output for "silent"', function() local screen = Screen.new(40, 5) screen:attach() |