[前][次][番号順一覧][スレッド一覧]

ruby-changes:53965

From: duerst <ko1@a...>
Date: Tue, 4 Dec 2018 15:31:46 +0900 (JST)
Subject: [ruby-changes:53965] duerst:r66185 (trunk): exclude skin tones as second component in TestEmojiBreaks#test_mixed_emoji

duerst	2018-12-04 15:31:40 +0900 (Tue, 04 Dec 2018)

  New Revision: 66185

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66185

  Log:
    exclude skin tones as second component in TestEmojiBreaks#test_mixed_emoji

  Modified files:
    trunk/test/ruby/enc/test_emoji_breaks.rb
Index: test/ruby/enc/test_emoji_breaks.rb
===================================================================
--- test/ruby/enc/test_emoji_breaks.rb	(revision 66184)
+++ test/ruby/enc/test_emoji_breaks.rb	(revision 66185)
@@ -105,6 +105,8 @@ TestEmojiBreaks.data_files_available? an https://github.com/ruby/ruby/blob/trunk/test/ruby/enc/test_emoji_breaks.rb#L105
       start = rand step
       start.step(by: step, to: length-1) do |t2|
         test2 = all_tests[t2]
+        # exclude skin tones, because they glue to previous grapheme clusters
+        next  if (0x1F3FB..0x1F3FF).include? test2.string.ord
         expected = [test1.string, test2.string]
         actual = (test1.string+test2.string).each_grapheme_cluster.to_a
         assert_equal expected, actual,

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]