1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 13:47:35 +00:00

LibJS: Implement Unicode aware String.prototype.to{Upper,Lower}Case

This commit is contained in:
Timothy Flynn 2021-07-25 15:17:38 -04:00 committed by Linus Groh
parent 98d8274040
commit 2e3a5b884c
4 changed files with 30 additions and 9 deletions

View file

@ -1,6 +1,10 @@
test("basic functionality", () => {
expect(String.prototype.toLowerCase).toHaveLength(0);
expect("ω".toLowerCase()).toBe("ω");
expect("Ω".toLowerCase()).toBe("ω");
expect("😀".toLowerCase()).toBe("😀");
expect("foo".toLowerCase()).toBe("foo");
expect("Foo".toLowerCase()).toBe("foo");
expect("FOO".toLowerCase()).toBe("foo");

View file

@ -1,6 +1,10 @@
test("basic functionality", () => {
expect(String.prototype.toUpperCase).toHaveLength(0);
expect("ω".toUpperCase()).toBe("Ω");
expect("Ω".toUpperCase()).toBe("Ω");
expect("😀".toUpperCase()).toBe("😀");
expect("foo".toUpperCase()).toBe("FOO");
expect("Foo".toUpperCase()).toBe("FOO");
expect("FOO".toUpperCase()).toBe("FOO");