From 75d9c413d49261b8f9a96f45edda0af9f0e8d947 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 17 Apr 2023 17:44:08 +0800 Subject: fix(excmd): make :def unknown rather than unimplemented (#23150) --- test/functional/ex_cmds/excmd_spec.lua | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'test/functional/ex_cmds/excmd_spec.lua') diff --git a/test/functional/ex_cmds/excmd_spec.lua b/test/functional/ex_cmds/excmd_spec.lua index e243f3c524..b313d6428c 100644 --- a/test/functional/ex_cmds/excmd_spec.lua +++ b/test/functional/ex_cmds/excmd_spec.lua @@ -2,6 +2,7 @@ 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 pcall_err = helpers.pcall_err local assert_alive = helpers.assert_alive @@ -26,5 +27,18 @@ describe('Ex cmds', function() pcall_err(command, ':bdelete 9999999999999999999999999999999999999999')) assert_alive() end) -end) + 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')) + end) +end) -- cgit