aboutsummaryrefslogtreecommitdiff
path: root/test/functional/api/command_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2023-02-14 05:19:04 -0500
committerGitHub <noreply@github.com>2023-02-14 02:19:04 -0800
commit46a87a5d2bac598fed0870f0d3c926087f95d30f (patch)
tree500dba055ff89fcc0610e7a497d7a4471bff04f1 /test/functional/api/command_spec.lua
parent53968082675cd3b8d1809e53a47c0311b7347ef9 (diff)
downloadrneovim-46a87a5d2bac598fed0870f0d3c926087f95d30f.tar.gz
rneovim-46a87a5d2bac598fed0870f0d3c926087f95d30f.tar.bz2
rneovim-46a87a5d2bac598fed0870f0d3c926087f95d30f.zip
refactor(api): VALIDATE macros #22187
Problem: - API validation involves too much boilerplate. - API validation errors are not consistently worded. Solution: Introduce some macros. Currently these are clumsy, but they at least help with consistency and avoid some nesting.
Diffstat (limited to 'test/functional/api/command_spec.lua')
-rw-r--r--test/functional/api/command_spec.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/functional/api/command_spec.lua b/test/functional/api/command_spec.lua
index d0fb26edc7..189f9d4f98 100644
--- a/test/functional/api/command_spec.lua
+++ b/test/functional/api/command_spec.lua
@@ -543,7 +543,7 @@ 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, [[
+ matches("Invalid command name %(must begin with an uppercase letter%): 'test'", pcall_err(exec_lua, [[
vim.api.nvim_create_user_command('test', 'echo "hi"', {})
]]))