mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
Add missing case for backspace control character in JSON.parse()
JerryScript-DCO-1.0-Signed-off-by: Roland Takacs rtakacs.u-szeged@partner.samsung.com
This commit is contained in:
parent
8aeb2a055e
commit
dcc704d1e8
@ -163,6 +163,11 @@ ecma_builtin_json_parse_string (ecma_json_token_t *token_p) /**< token argument
|
||||
*current_p = '\t';
|
||||
break;
|
||||
}
|
||||
case 'b':
|
||||
{
|
||||
*current_p = '\b';
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
return;
|
||||
|
||||
@ -38,6 +38,8 @@ str = '-32.5e002';
|
||||
assert (JSON.parse (str) == -3250);
|
||||
str = '"str"';
|
||||
assert (JSON.parse (str) == "str");
|
||||
str = '"\\b\\f\\n\\t\\r"'
|
||||
assert (JSON.parse (str) === "\b\f\n\t\r");
|
||||
|
||||
check_parse_error ('undefined');
|
||||
check_parse_error ('falses');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user