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/ui/bufhl_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/ui/bufhl_spec.lua')
-rw-r--r-- | test/functional/ui/bufhl_spec.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/functional/ui/bufhl_spec.lua b/test/functional/ui/bufhl_spec.lua index 46bfae8de2..76baf2cddb 100644 --- a/test/functional/ui/bufhl_spec.lua +++ b/test/functional/ui/bufhl_spec.lua @@ -751,8 +751,8 @@ describe('Buffer highlighting', function() it('validates contents', function() -- this used to leak memory - eq('Chunk is not an array', pcall_err(set_virtual_text, id1, 0, {"texty"}, {})) - eq('Chunk is not an array', pcall_err(set_virtual_text, id1, 0, {{"very"}, "texty"}, {})) + eq('Invalid chunk: expected Array, got String', pcall_err(set_virtual_text, id1, 0, {"texty"}, {})) + eq('Invalid chunk: expected Array, got String', pcall_err(set_virtual_text, id1, 0, {{"very"}, "texty"}, {})) end) it('can be retrieved', function() |