1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:57:43 +00:00

LibJS: Correcly handle surrogates in escape()

Fixes test/annexB/built-ins/escape/escape-above{,-astral}.js in
test262. All tests in test/annexB/built-ins/escape pass now.
This commit is contained in:
Nico Weber 2022-01-13 19:45:11 -05:00 committed by Linus Groh
parent 95b8c1745a
commit 23cde7685c
2 changed files with 4 additions and 2 deletions

View file

@ -4,6 +4,7 @@ test("escape", () => {
["äöü", "%E4%F6%FC"],
["ć", "%u0107"],
["@*_+-./", "@*_+-./"],
["\ud834\udf06", "%uD834%uDF06"],
].forEach(test => {
expect(escape(test[0])).toBe(test[1]);
});