aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ex_cmds/excmd_spec.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/ex_cmds/excmd_spec.lua')
-rw-r--r--test/functional/ex_cmds/excmd_spec.lua52
1 files changed, 31 insertions, 21 deletions
diff --git a/test/functional/ex_cmds/excmd_spec.lua b/test/functional/ex_cmds/excmd_spec.lua
index a92329ede5..d16a52ee62 100644
--- a/test/functional/ex_cmds/excmd_spec.lua
+++ b/test/functional/ex_cmds/excmd_spec.lua
@@ -1,8 +1,8 @@
-local helpers = require("test.functional.helpers")(after_each)
+local helpers = require('test.functional.helpers')(after_each)
local command = helpers.command
local eq = helpers.eq
local clear = helpers.clear
-local funcs = helpers.funcs
+local fn = helpers.fn
local pcall_err = helpers.pcall_err
local assert_alive = helpers.assert_alive
@@ -20,15 +20,25 @@ describe('Ex cmds', function()
command(':later 9999999999999999999999999999999999999999')
command(':echo expand("#<9999999999999999999999999999999999999999")')
command(':lockvar 9999999999999999999999999999999999999999')
- command(':winsize 9999999999999999999999999999999999999999 9999999999999999999999999999999999999999')
- check_excmd_err(':tabnext 9999999999999999999999999999999999999999',
- 'Vim(tabnext):E475: Invalid argument: 9999999999999999999999999999999999999999')
- check_excmd_err(':N 9999999999999999999999999999999999999999',
- 'Vim(Next):E939: Positive count required')
- check_excmd_err(':bdelete 9999999999999999999999999999999999999999',
- 'Vim(bdelete):E939: Positive count required')
- eq('Vim(menu):E329: No menu "9999999999999999999999999999999999999999"',
- pcall_err(command, ':menu 9999999999999999999999999999999999999999'))
+ command(
+ ':winsize 9999999999999999999999999999999999999999 9999999999999999999999999999999999999999'
+ )
+ check_excmd_err(
+ ':tabnext 9999999999999999999999999999999999999999',
+ 'Vim(tabnext):E475: Invalid argument: 9999999999999999999999999999999999999999'
+ )
+ check_excmd_err(
+ ':N 9999999999999999999999999999999999999999',
+ 'Vim(Next):E939: Positive count required'
+ )
+ check_excmd_err(
+ ':bdelete 9999999999999999999999999999999999999999',
+ 'Vim(bdelete):E939: Positive count required'
+ )
+ eq(
+ 'Vim(menu):E329: No menu "9999999999999999999999999999999999999999"',
+ pcall_err(command, ':menu 9999999999999999999999999999999999999999')
+ )
assert_alive()
end)
@@ -39,15 +49,15 @@ describe('Ex cmds', function()
it(':def is an unknown command #23149', function()
eq('Vim:E492: Not an editor command: def', pcall_err(command, 'def'))
- eq(1, funcs.exists(':d'))
- eq('delete', funcs.fullcommand('d'))
- eq(1, funcs.exists(':de'))
- eq('delete', funcs.fullcommand('de'))
- eq(0, funcs.exists(':def'))
- eq('', funcs.fullcommand('def'))
- eq(1, funcs.exists(':defe'))
- eq('defer', funcs.fullcommand('defe'))
- eq(2, funcs.exists(':defer'))
- eq('defer', funcs.fullcommand('defer'))
+ eq(1, fn.exists(':d'))
+ eq('delete', fn.fullcommand('d'))
+ eq(1, fn.exists(':de'))
+ eq('delete', fn.fullcommand('de'))
+ eq(0, fn.exists(':def'))
+ eq('', fn.fullcommand('def'))
+ eq(1, fn.exists(':defe'))
+ eq('defer', fn.fullcommand('defe'))
+ eq(2, fn.exists(':defer'))
+ eq('defer', fn.fullcommand('defer'))
end)
end)