mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-02 22:29:10 +00:00
LibJS: Implement Unicode aware String.prototype.to{Upper,Lower}Case
This commit is contained in:
parent
98d8274040
commit
2e3a5b884c
Notes:
sideshowbarker
2024-07-18 08:18:33 +09:00
Author: https://github.com/trflynn89
Commit: 2e3a5b884c
Pull-request: https://github.com/SerenityOS/serenity/pull/9004
Reviewed-by: https://github.com/linusg ✅
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