mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00: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:
@@ -240,7 +240,7 @@ describe("API: set highlight", function()
|
||||
it('validation', function()
|
||||
eq("Invalid 'blend': out of range",
|
||||
pcall_err(meths.set_hl, 0, 'Test_hl3', {fg='#FF00FF', blend=999}))
|
||||
eq("Invalid blend: expected Integer, got Array",
|
||||
eq("Invalid 'blend': expected Integer, got Array",
|
||||
pcall_err(meths.set_hl, 0, 'Test_hl3', {fg='#FF00FF', blend={}}))
|
||||
end)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user