Skip to content

Commit 223f37c

Browse files
mrzasanobu
andcommitted
Improve tests for small UTF regex with case fold.
Co-authored-by: Nobuyoshi Nakada <[email protected]>
1 parent a50fbc5 commit 223f37c

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

test/ruby/test_regexp.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2118,13 +2118,10 @@ def test_linear_performance
21182118
def test_bug_16145_caseinsensitive_small_utf # [Bug#16145]
21192119
o_acute_lower = 243.chr('UTF-8')
21202120
o_acute_upper = 211.chr('UTF-8')
2121-
# [xó] =~ "abcÓ"
2122-
assert(/[x#{o_acute_lower}]/i.match?("abc#{o_acute_upper}"), "should match o acute case insensitive")
2123-
2121+
assert_match(/[x#{o_acute_lower}]/i, "abc#{o_acute_upper}", "should match o acute case insensitive")
21242122

21252123
e_acute_lower = 233.chr('UTF-8')
21262124
e_acute_upper = 201.chr('UTF-8')
2127-
# [xé] =~ 'CAFÉ'
2128-
assert(/[x#{e_acute_lower}]/i.match?("CAF#{e_acute_upper}"), "should match e acute case insensitive")
2125+
assert_match(/[x#{e_acute_lower}]/i, "CAF#{e_acute_upper}", "should match e acute case insensitive")
21292126
end
21302127
end

0 commit comments

Comments
 (0)