ruby-changes:71386
From: Martin <ko1@a...>
Date: Sun, 13 Mar 2022 09:41:44 +0900 (JST)
Subject: [ruby-changes:71386] 8f59482f5d (master): add some tests for Unicode Version 14.0.0
https://git.ruby-lang.org/ruby.git/commit/?id=8f59482f5d From 8f59482f5d1f77542fe3c8e8434cb1dbbc764ecf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20D=C3=BCrst?= <duerst@i...> Date: Sat, 12 Mar 2022 21:33:51 +0900 Subject: add some tests for Unicode Version 14.0.0 --- test/ruby/test_regexp.rb | 5 +++++ test/ruby/test_string.rb | 1 + 2 files changed, 6 insertions(+) diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb index 80caa879e4..4761d1dc39 100644 --- a/test/ruby/test_regexp.rb +++ b/test/ruby/test_regexp.rb @@ -1205,6 +1205,11 @@ class TestRegexp < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_regexp.rb#L1205 assert_no_match(/^\p{age=12.0}$/u, "\u32FF") assert_match(/^\p{age=12.1}$/u, "\u32FF") + assert_no_match(/^\p{age=13.0}$/u, "\u{10570}") + assert_match(/^\p{age=14.0}$/u, "\u{10570}") + assert_match(/^\p{age=14.0}$/u, "\u9FFF") + assert_match(/^\p{age=14.0}$/u, "\u{2A6DF}") + assert_match(/^\p{age=14.0}$/u, "\u{2B738}") end MatchData_A = eval("class MatchData_\u{3042} < MatchData; self; end") diff --git a/test/ruby/test_string.rb b/test/ruby/test_string.rb index 0e2a484478..1d0a68038a 100644 --- a/test/ruby/test_string.rb +++ b/test/ruby/test_string.rb @@ -2384,6 +2384,7 @@ CODE https://github.com/ruby/ruby/blob/trunk/test/ruby/test_string.rb#L2384 assert_equal(S("HELLO"), S("HELLO").upcase) assert_equal(S("ABC HELLO 123"), S("abc HELLO 123").upcase) assert_equal(S("H\0""ELLO"), S("H\0""ello").upcase) + assert_equal(S("\u{10574}"), S("\u{1059B}").upcase) end def test_upcase! -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/