From bbdf97254a2ed63d764a39e92a3adcecc49b962b Mon Sep 17 00:00:00 2001 From: Marcondiro Date: Sun, 5 May 2024 23:01:09 +0200 Subject: fix #124714 str.to_lowercase sigma handling --- library/alloc/tests/str.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'library/alloc/tests') diff --git a/library/alloc/tests/str.rs b/library/alloc/tests/str.rs index df8a260624a..0078f5eaa3d 100644 --- a/library/alloc/tests/str.rs +++ b/library/alloc/tests/str.rs @@ -1848,6 +1848,9 @@ fn to_lowercase() { assert_eq!("ΑΣ'Α".to_lowercase(), "ασ'α"); assert_eq!("ΑΣ''Α".to_lowercase(), "ασ''α"); + // https://github.com/rust-lang/rust/issues/124714 + assert_eq!("abcdefghijklmnopΣ".to_lowercase(), "abcdefghijklmnopς"); + // a really long string that has it's lowercase form // even longer. this tests that implementations don't assume // an incorrect upper bound on allocations -- cgit 1.4.1-3-g733a5