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:
ZyX
2016-03-07 06:41:00 +03:00
parent 1fc84ae2cd
commit 4a29995fe7
2 changed files with 4 additions and 4 deletions

View File

@@ -249,10 +249,10 @@ json_decode_string_cycle_start:
}
ContainerStackItem last_container = kv_last(container_stack);
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;
} 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;
} else if (didcomma) {
EMSG2(_("E474: Trailing comma: %s"), p);

View File

@@ -198,9 +198,9 @@ describe('json_decode() function', function()
it('fails to parse containers which are closed by different brackets',
function()
eq('Vim(call):E474: Closing dictionary with bracket: ]',
eq('Vim(call):E474: Closing dictionary with square bracket: ]',
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("[}")'))
end)