Correctly handle celestial plane codepoints in ES5.1. (#3510)

Fixes #3498.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg
2020-01-14 15:11:59 +01:00
committed by Dániel Bátyai
parent d6070a9fed
commit 0d7b461185
4 changed files with 34 additions and 7 deletions
+12
View File
@@ -62,5 +62,17 @@ main (void)
jerry_release_value (test_values[idx]);
}
char test_source[] = "\xF0\x9D\x84\x9E";
jerry_value_t result = jerry_parse (NULL,
0,
(const jerry_char_t *) test_source,
sizeof (test_source) - 1,
JERRY_PARSE_NO_OPTS);
TEST_ASSERT (jerry_value_is_error (result));
TEST_ASSERT (jerry_get_error_type (result) == JERRY_ERROR_SYNTAX);
jerry_release_value (result);
jerry_cleanup ();
} /* main */