summaryrefslogtreecommitdiff
path: root/test/ruby/test_regexp.rb
diff options
context:
space:
mode:
authorMaciek Rząsa <[email protected]>2025-02-21 11:39:47 +0100
committerNobuyoshi Nakada <[email protected]>2025-02-28 12:34:38 +0900
commit223f37c00271001cc522cf00822bae6bbe7340ea (patch)
treeee5b940965625c1753b0012b84389c52d42f214f /test/ruby/test_regexp.rb
parenta50fbc56a30a0665102781019029e9cf9ddb3576 (diff)
Improve tests for small UTF regex with case fold.
Co-authored-by: Nobuyoshi Nakada <[email protected]>
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12787
Diffstat (limited to 'test/ruby/test_regexp.rb')
-rw-r--r--test/ruby/test_regexp.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/test/ruby/test_regexp.rb b/test/ruby/test_regexp.rb
index 72c96d6c9b..f22128686e 100644
--- a/test/ruby/test_regexp.rb
+++ b/test/ruby/test_regexp.rb
@@ -2118,13 +2118,10 @@ class TestRegexp < Test::Unit::TestCase
def test_bug_16145_caseinsensitive_small_utf # [Bug#16145]
o_acute_lower = 243.chr('UTF-8')
o_acute_upper = 211.chr('UTF-8')
- # [xó] =~ "abcÓ"
- assert(/[x#{o_acute_lower}]/i.match?("abc#{o_acute_upper}"), "should match o acute case insensitive")
-
+ assert_match(/[x#{o_acute_lower}]/i, "abc#{o_acute_upper}", "should match o acute case insensitive")
e_acute_lower = 233.chr('UTF-8')
e_acute_upper = 201.chr('UTF-8')
- # [xé] =~ 'CAFÉ'
- assert(/[x#{e_acute_lower}]/i.match?("CAF#{e_acute_upper}"), "should match e acute case insensitive")
+ assert_match(/[x#{e_acute_lower}]/i, "CAF#{e_acute_upper}", "should match e acute case insensitive")
end
end