diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2023-02-14 05:19:04 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-14 02:19:04 -0800 |
commit | 46a87a5d2bac598fed0870f0d3c926087f95d30f (patch) | |
tree | 500dba055ff89fcc0610e7a497d7a4471bff04f1 /test/functional/lua/vim_spec.lua | |
parent | 53968082675cd3b8d1809e53a47c0311b7347ef9 (diff) | |
download | rneovim-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/lua/vim_spec.lua')
-rw-r--r-- | test/functional/lua/vim_spec.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/lua/vim_spec.lua b/test/functional/lua/vim_spec.lua index 867f366d06..b43e5b28db 100644 --- a/test/functional/lua/vim_spec.lua +++ b/test/functional/lua/vim_spec.lua @@ -1458,7 +1458,7 @@ describe('lua stdlib', function() ]] eq('', funcs.luaeval "vim.bo.filetype") eq(true, funcs.luaeval "vim.bo[BUF].modifiable") - matches("no such option: 'nosuchopt'$", + matches("Invalid option %(not found%): 'nosuchopt'$", pcall_err(exec_lua, 'return vim.bo.nosuchopt')) matches("Expected lua string$", pcall_err(exec_lua, 'return vim.bo[0][0].autoread')) @@ -1479,7 +1479,7 @@ describe('lua stdlib', function() eq(0, funcs.luaeval "vim.wo.cole") eq(0, funcs.luaeval "vim.wo[0].cole") eq(0, funcs.luaeval "vim.wo[1001].cole") - matches("no such option: 'notanopt'$", + matches("Invalid option %(not found%): 'notanopt'$", pcall_err(exec_lua, 'return vim.wo.notanopt')) matches("Expected lua string$", pcall_err(exec_lua, 'return vim.wo[0][0].list')) |