From 223f37c00271001cc522cf00822bae6bbe7340ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciek=20Rz=C4=85sa?= Date: Fri, 21 Feb 2025 11:39:47 +0100 Subject: [PATCH] Improve tests for small UTF regex with case fold. Co-authored-by: Nobuyoshi Nakada --- test/ruby/test_regexp.rb | 7 ++----- 1 file 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