diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-05-05 19:03:08 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-05-05 19:07:56 +0800 |
commit | 3a1e17e3a1767b4ff8a082150f7f9d6bda50cc8f (patch) | |
tree | 2483adbfb8e0bfffaaf5f31b52c94a1ce8f2266e /test/functional/vimscript/execute_spec.lua | |
parent | 4a098b97e53551a3383e669f4730be542c61e012 (diff) | |
download | rneovim-3a1e17e3a1767b4ff8a082150f7f9d6bda50cc8f.tar.gz rneovim-3a1e17e3a1767b4ff8a082150f7f9d6bda50cc8f.tar.bz2 rneovim-3a1e17e3a1767b4ff8a082150f7f9d6bda50cc8f.zip |
test: add tests for executing commands with backwards range
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() |