Skip to content

Commit 4e516a4

Browse files
committed
Try for all encodings in TestM17N#each_encoding
1 parent 484ea00 commit 4e516a4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/ruby/test_m17n.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1584,13 +1584,16 @@ def test_combchar_codepoint
15841584
assert_equal([0x30BB, 0x309A], "\u30BB\u309A".codepoints.to_a)
15851585
end
15861586

1587-
def each_encoding(*strings)
1588-
Encoding.list.each do |enc|
1587+
def assert_each_encoding(*strings)
1588+
all = AllFailures.new
1589+
all.foreach(*Encoding.list) do |enc|
15891590
next if enc.dummy?
15901591
strs = strings.map {|s| s.encode(enc)} rescue next
15911592
yield(*strs)
15921593
end
1594+
assert(all.pass?, message {all.message.chomp(".")})
15931595
end
1596+
alias each_encoding assert_each_encoding
15941597

15951598
def test_str_b
15961599
s = "\u3042"

0 commit comments

Comments
 (0)