mirror of
https://github.com/neovim/neovim.git
synced 2026-01-04 10:26:42 +10:00
refactor(api): consistent VALIDATE messages #22262
Problem: Validation messages are not consistently formatted. - Parameter names sometimes are NOT quoted. - Descriptive names (non-parameters) sometimes ARE quoted. Solution: Always quote the `name` value passed to a VALIDATE macro _unless_ the value has whitespace.
This commit is contained in:
@@ -751,8 +751,8 @@ describe('Buffer highlighting', function()
|
||||
|
||||
it('validates contents', function()
|
||||
-- this used to leak memory
|
||||
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"}, {}))
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user