Improve tests for small UTF regex with case fold.
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
This commit is contained in:
parent
a50fbc56a3
commit
223f37c002
Notes:
git
2025-02-28 03:34:54 +00:00
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user