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