mirror of
https://github.com/neovim/neovim.git
synced 2025-09-18 09:18:19 +00:00
eval/decode: Rename brackets in error messages
U+007D is officially RIGHT CURLY BRACKET. U+005D is officially RIGHT SQUARE BRACKET.
This commit is contained in:
@@ -249,10 +249,10 @@ json_decode_string_cycle_start:
|
|||||||
}
|
}
|
||||||
ContainerStackItem last_container = kv_last(container_stack);
|
ContainerStackItem last_container = kv_last(container_stack);
|
||||||
if (*p == '}' && last_container.container.v_type != VAR_DICT) {
|
if (*p == '}' && last_container.container.v_type != VAR_DICT) {
|
||||||
EMSG2(_("E474: Closing list with figure brace: %s"), p);
|
EMSG2(_("E474: Closing list with curly bracket: %s"), p);
|
||||||
goto json_decode_string_fail;
|
goto json_decode_string_fail;
|
||||||
} else if (*p == ']' && last_container.container.v_type != VAR_LIST) {
|
} else if (*p == ']' && last_container.container.v_type != VAR_LIST) {
|
||||||
EMSG2(_("E474: Closing dictionary with bracket: %s"), p);
|
EMSG2(_("E474: Closing dictionary with square bracket: %s"), p);
|
||||||
goto json_decode_string_fail;
|
goto json_decode_string_fail;
|
||||||
} else if (didcomma) {
|
} else if (didcomma) {
|
||||||
EMSG2(_("E474: Trailing comma: %s"), p);
|
EMSG2(_("E474: Trailing comma: %s"), p);
|
||||||
|
@@ -198,9 +198,9 @@ describe('json_decode() function', function()
|
|||||||
|
|
||||||
it('fails to parse containers which are closed by different brackets',
|
it('fails to parse containers which are closed by different brackets',
|
||||||
function()
|
function()
|
||||||
eq('Vim(call):E474: Closing dictionary with bracket: ]',
|
eq('Vim(call):E474: Closing dictionary with square bracket: ]',
|
||||||
exc_exec('call json_decode("{]")'))
|
exc_exec('call json_decode("{]")'))
|
||||||
eq('Vim(call):E474: Closing list with figure brace: }',
|
eq('Vim(call):E474: Closing list with curly bracket: }',
|
||||||
exc_exec('call json_decode("[}")'))
|
exc_exec('call json_decode("[}")'))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user