e4u-emoji 0.0.0 → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28,4 +28,28 @@ describe E4U::Emoji do
28
28
  emj.black_sun_with_rays.should == expect
29
29
  end
30
30
  end
31
+
32
+ it "DoCoMo絵文字で複合絵文字を返すこと" do
33
+ E4U.create(:docomo).love_hotel.should_not == [0xE669,0xE6EF].pack('U')
34
+ E4U.create(:docomo).sun_behind_cloud.should_not == [0xE63E,0xE63F].pack('U')
35
+
36
+ E4U.create(:docomo).love_hotel.should == [0xE669,0xE6EF].pack('U*')
37
+ E4U.create(:docomo).sun_behind_cloud.should == [0xE63E,0xE63F].pack('U*')
38
+ end
39
+
40
+ it "KDDI絵文字で複合絵文字を返すこと" do
41
+ E4U.create(:kddi).happy_face_with_open_mouth_and_cold_sweat.should_not == [0xE471,0xE5B1].pack('U')
42
+
43
+ E4U.create(:kddi).happy_face_with_open_mouth_and_cold_sweat.should == [0xE471,0xE5B1].pack('U*')
44
+ end
45
+
46
+ it "Softbank絵文字で複合絵文字を返すこと" do
47
+ E4U.create(:softbank).happy_face_with_open_mouth_and_cold_sweat.should_not == [0xE415,0xE331].pack('U')
48
+ E4U.create(:softbank).love_letter.should_not == [0xE103,0xE328].pack('U')
49
+ E4U.create(:softbank).sun_behind_cloud.should_not == [0xE04A,0xE049].pack('U')
50
+
51
+ E4U.create(:softbank).happy_face_with_open_mouth_and_cold_sweat.should == [0xE415,0xE331].pack('U*')
52
+ E4U.create(:softbank).love_letter.should == [0xE103,0xE328].pack('U*')
53
+ E4U.create(:softbank).sun_behind_cloud.should == [0xE04A,0xE049].pack('U*')
54
+ end
31
55
  end
@@ -14,7 +14,7 @@ def make_emoji_table output, target, label
14
14
 
15
15
  if emj[target]
16
16
  hex = emj[target].to_s.tr('>', '').split(/\+/, -1).map{|e| "0x%X" % [e.hex]}
17
- val = "[#{hex.join(',')}].pack('U').freeze"
17
+ val = "[#{hex.join(',')}].pack('U*').freeze"
18
18
  elsif emj[:text_fallback] || emj[:text_repr]
19
19
  val = (emj[:text_fallback] || emj[:text_repr]).dump
20
20
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: e4u-emoji
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - fistfvck