summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authornagachika <nagachika@ruby-lang.org>2023-07-22 13:31:34 +0900
committernagachika <nagachika@ruby-lang.org>2023-07-22 13:31:34 +0900
commit4e0653db3315e9e7859e38e0995e2b9900471370 (patch)
tree2c3c08d35d4e2a18ce671c84f9b71435b9b21720 /test/ruby
parentfa72ba72f8c64fd0fa87c8f68cbc31f2e7b94b00 (diff)
merge revision(s) 2c8f2871a8aeff592369a993b1d69557160cfa61: [Backport #19532]
Fix handling of 6-byte codepoints in left_adjust_char_head in CESU-8 encoding --- enc/cesu_8.c | 23 +++++++++++++++++++---- test/ruby/enc/test_cesu8.rb | 4 ++++ 2 files changed, 23 insertions(+), 4 deletions(-)
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/enc/test_cesu8.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ruby/enc/test_cesu8.rb b/test/ruby/enc/test_cesu8.rb
index d9debe76cd..68a08389ea 100644
--- a/test/ruby/enc/test_cesu8.rb
+++ b/test/ruby/enc/test_cesu8.rb
@@ -106,4 +106,8 @@ EOT
assert_equal chr, ord.chr("cesu-8")
end
end
+
+ def test_cesu8_left_adjust_char_head
+ assert_equal("", "\u{10000}".encode("cesu-8").chop)
+ end
end