Refactor fromCharCode including support for surrogate pairs.

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg@inf.u-szeged.hu
This commit is contained in:
Zoltan Herczeg
2015-08-05 05:38:23 -07:00
parent f10a48df96
commit 8df6cdd1e9
2 changed files with 62 additions and 29 deletions
+2
View File
@@ -46,6 +46,8 @@ assert (encodeURIComponent ("OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}\x7
assert (encodeURI ("\xe9") == "%C3%A9");
assert (encodeURI ("\ud7ff") == "%ED%9F%BF");
assert (encodeURI ("\ue000") == "%EE%80%80");
assert (encodeURI ("\ud800\udc00") == "%F0%90%80%80");
assert (encodeURI (String.fromCharCode(0xd800, 0xdc00)) == "%F0%90%80%80");
checkEncodeURIParseError ("\ud800");
checkEncodeURIParseError ("\udfff");