Test and fix CESU-8 handling in String builtins.

Fixes #757
JerryScript-DCO-1.0-Signed-off-by: Laszlo Vidacs lvidacs.u-szeged@partner.samsung.com
This commit is contained in:
Laszlo Vidacs
2015-12-01 17:06:27 +01:00
committed by Evgeny Gavrin
parent cb0087b517
commit b8b3b1f275
3 changed files with 36 additions and 4 deletions
+2 -1
View File
@@ -43,13 +43,14 @@ assert("w2\uFFA2A".indexOf("A") === 3);
assert("w2\u1D306A".indexOf("A") === 4);
// check surrogate pairs
assert("\uD834\uDF06".indexOf("\uDF06") === 1);
assert("\uD834\uDF06w2\u1D306D".indexOf("D") === 6);
assert("\ud800\dc00".indexOf("\dc00") === 1);
assert("\u8000\u0700\u8000\u8000A".indexOf("A", 3) === 4);
// check prefix search
assert("aaaabaaa".indexOf("aaaba") === 1);