From 8f59482f5d1f77542fe3c8e8434cb1dbbc764ecf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20D=C3=BCrst?= Date: Sat, 12 Mar 2022 21:33:51 +0900 Subject: [PATCH] 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 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 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!