diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 22:40:55 +0000 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 22:40:55 +0000 |
| commit | 0bd3cd90d902a1419db129427980ad7af1650d50 (patch) | |
| tree | 2554d10989c0387909d002f41ecbf380dd431b8b /test/functional/api/command_spec.lua | |
| parent | 4cb64e3b084995a0924d521e89c3e341e2200a6a (diff) | |
| parent | 4a8bf24ac690004aedf5540fa440e788459e5e34 (diff) | |
| download | rneovim-0bd3cd90d902a1419db129427980ad7af1650d50.tar.gz rneovim-0bd3cd90d902a1419db129427980ad7af1650d50.tar.bz2 rneovim-0bd3cd90d902a1419db129427980ad7af1650d50.zip | |
Merge remote-tracking branch 'upstream/master' into fix_20726
Diffstat (limited to 'test/functional/api/command_spec.lua')
| -rw-r--r-- | test/functional/api/command_spec.lua | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/test/functional/api/command_spec.lua b/test/functional/api/command_spec.lua index d0fb26edc7..1ddb289ded 100644 --- a/test/functional/api/command_spec.lua +++ b/test/functional/api/command_spec.lua @@ -24,7 +24,7 @@ describe('nvim_get_commands', function() eq({}, meths.get_commands({builtin=false})) end) - it('validates input', function() + it('validation', function() eq('builtin=true not implemented', pcall_err(meths.get_commands, {builtin=true})) eq("Invalid key: 'foo'", pcall_err(meths.get_commands, @@ -543,23 +543,19 @@ describe('nvim_create_user_command', function() end) it('does not allow invalid command names', function() - matches("'name' must begin with an uppercase letter", pcall_err(exec_lua, [[ + eq("Invalid command name (must start with uppercase): 'test'", pcall_err(exec_lua, [[ vim.api.nvim_create_user_command('test', 'echo "hi"', {}) ]])) - - matches('Invalid command name', pcall_err(exec_lua, [[ + eq("Invalid command name: 't@'", pcall_err(exec_lua, [[ vim.api.nvim_create_user_command('t@', 'echo "hi"', {}) ]])) - - matches('Invalid command name', pcall_err(exec_lua, [[ + eq("Invalid command name: 'T@st'", pcall_err(exec_lua, [[ vim.api.nvim_create_user_command('T@st', 'echo "hi"', {}) ]])) - - matches('Invalid command name', pcall_err(exec_lua, [[ + eq("Invalid command name: 'Test!'", pcall_err(exec_lua, [[ vim.api.nvim_create_user_command('Test!', 'echo "hi"', {}) ]])) - - matches('Invalid command name', pcall_err(exec_lua, [[ + eq("Invalid command name: '💩'", pcall_err(exec_lua, [[ vim.api.nvim_create_user_command('💩', 'echo "hi"', {}) ]])) end) |