mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:27:45 +00:00
LibJS: Implement Unicode aware String.prototype.to{Upper,Lower}Case
This commit is contained in:
parent
98d8274040
commit
2e3a5b884c
4 changed files with 30 additions and 9 deletions
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue