spec/unicode_emoji_spec.rb in unicode-emoji-3.1.0 vs spec/unicode_emoji_spec.rb in unicode-emoji-3.1.1

- old
+ new

@@ -106,9 +106,16 @@ it "matches 14.0 emoji" do "๐Ÿชบ nest with eggs" =~ Unicode::Emoji::REGEX assert_equal "๐Ÿชบ", $& end + + # See gh#12 and https://github.com/matt17r/nw5k/commit/05a34d3c9211a23e5ae6853bb19fd2f224779ef4#diff-afb6f8bc3bae71b75743e00882a060863e2430cbe858ec9014e5956504dfc61cR2 + it "matches family emoji correctly" do + ["๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ", "๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ", "๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง", "๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ฆ", "๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ", "๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ง", "๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ", "๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ", "๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง", "๐Ÿ‘จโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ", "๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ฆ", "๐Ÿ‘จโ€๐Ÿ‘งโ€๐Ÿ‘ง", "๐Ÿ‘ฉโ€๐Ÿ‘ฆโ€๐Ÿ‘ฆ", "๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ", "๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง"].each { |family| + assert_equal family, family[Unicode::Emoji::REGEX] + } + end end describe "REGEX_VALID" do it "matches most singleton emoji codepoints" do "๐Ÿ˜ด sleeping face" =~ Unicode::Emoji::REGEX_VALID