Compare our emoji to emoji straight from the horse's mouth

This commit is contained in:
Javan Makhmali 2013-11-06 09:22:12 -05:00
Родитель 150c509735
Коммит c180447c5b
4 изменённых файлов: 15 добавлений и 776 удалений

Просмотреть файл

@ -6,3 +6,11 @@ Rake::TestTask.new do |t|
t.libs << "test"
t.test_files = FileList["test/*_test.rb"]
end
namespace :db do
task :generate do
system "cp /System/Library/Input\\ Methods/CharacterPalette.app/Contents/Resources/Category-Emoji.plist db/"
system "plutil -convert json db/Category-Emoji.plist"
system "mv db/Category-Emoji.plist db/Category-Emoji.json"
end
end

1
db/Category-Emoji.json Normal file

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

756
test/fixtures/EmojiSources.txt поставляемый
Просмотреть файл

@ -1,756 +0,0 @@
# EmojiSources-6.3.0.txt
# Date: 2012-12-11, 11:07:00 GMT [MS, KW]
#
# Unicode Character Database
# Copyright (c) 1991-2012 Unicode, Inc.
# For terms of use, see http://www.unicode.org/terms_of_use.html
# For documentation, see http://www.unicode.org/reports/tr44/
#
# This file provides mappings between Unicode code points and sequences on one hand
# and Shift-JIS codes for cell phone carrier symbols on the other hand.
# Each mapping is symmetric ("round trip"), for equivalent Unicode and carrier
# symbols or sequences. This file does not include best-fit ("fallback")
# mappings to similar but not equivalent symbols in either mapping direction.
#
# Note: It is possible that future versions of this file will include
# additional data columns providing mappings for additional vendors.
#
# Created for Unicode 6.0 by Markus Scherer.
# Updated for Unicode 6.1, 6.2, and 6.3 by Ken Whistler (no changes to mappings).
#
# Format: Semicolon-delimited file with a fixed number of fields.
# The number of fields may increase in the future.
#
# Fields:
# 0: Unicode code point or sequence
# 1: DoCoMo Shift-JIS code
# 2: KDDI Shift-JIS code
# 3: SoftBank Shift-JIS code
#
# Each field 1..3 contains a code if and only if the vendor character set
# has a symbol which is equivalent to the Unicode character or sequence.
0023 20E3;F985;F489;F7B0
0030 20E3;F990;F7C9;F7C5
0031 20E3;F987;F6FB;F7BC
0032 20E3;F988;F6FC;F7BD
0033 20E3;F989;F740;F7BE
0034 20E3;F98A;F741;F7BF
0035 20E3;F98B;F742;F7C0
0036 20E3;F98C;F743;F7C1
0037 20E3;F98D;F744;F7C2
0038 20E3;F98E;F745;F7C3
0039 20E3;F98F;F746;F7C4
00A9;F9D6;F774;F7EE
00AE;F9DB;F775;F7EF
2002;;F7AA;
2003;;F7A9;
2005;;F7AB;
203C;F9A9;F3F1;
2049;F9A8;F3F0;
2122;F9D7;F76A;FBD7
2139;;F74F;
2194;F9E1;F47E;
2195;F9E2;F480;
2196;F8F8;F768;F7D7
2197;F8D9;F771;F7D6
2198;F8F7;F769;F7D8
2199;F949;F772;F7D9
21A9;F97E;F779;
21AA;;F778;
231A;F9C4;F797;
231B;;F798;
23E9;;F74C;F7DC
23EA;;F74B;F7DD
23EB;;F761;
23EC;;F760;
23F0;F95E;F7B1;
23F3;F9C1;F654;
24C2;F8BD;;
25AA;;F74E;
25AB;;F74D;
25B6;;F74A;F7DA
25C0;;F749;F7DB
25FB;;F754;
25FC;;F755;
25FD;;F750;
25FE;;F751;
2600;F89F;F660;F98B
2601;F8A0;F665;F98A
260E;F8E8;F7B3;F949
2611;;F7D9;
2614;F8A1;F664;F98C
2615;F8D1;F7B4;F986
261D;;F6CF;F94F
263A;;F6D4;FB54
2648;F8A7;F667;F7DF
2649;F8A8;F668;F7E0
264A;F8A9;F669;F7E1
264B;F8AA;F66A;F7E2
264C;F8AB;F66B;F7E3
264D;F8AC;F66C;F7E4
264E;F8AD;F66D;F7E5
264F;F8AE;F66E;F7E6
2650;F8AF;F66F;F7E7
2651;F8B0;F670;F7E8
2652;F8B1;F671;F7E9
2653;F8B2;F672;F7EA
2660;F8EF;F7BE;F7AE
2663;F8F1;F7C0;F7AF
2665;F8EE;F378;F7AC
2666;F8F0;F7BF;F7AD
2668;F99C;F695;F763
267B;F9DA;F47D;
267F;F8FC;F657;F7AA
2693;;F682;
26A0;F9DC;F659;F7F2
26A1;F8A3;F65F;F77D
26AA;;F756;
26AB;;F757;
26BD;F8B7;F68F;F958
26BE;F8B4;F693;F956
26C4;F8A2;F65D;F989
26C5;;F666;
26CE;;F673;F7EB
26D4;;F65C;
26EA;;F7EB;F977
26F2;;F342;F761
26F3;F8B5;F7B6;F954
26F5;F947;F68D;F95C
26FA;;F343;F762
26FD;F8CC;F78E;F97A
2702;F8D6;F6EF;F9B3
2705;;F77A;
2708;F8C3;F68C;F95D
2709;F977;F6FA;
270A;F8F4;F488;F950
270B;F8F6;F7C4;F952
270C;F8F5;F7C3;F951
270F;F9BE;F679;
2712;F952;F7DA;
2714;;F773;
2716;;F76B;
2728;F99F;F37E;F9CE
2733;;F75A;F7A6
2734;;F651;F7A5
2744;;F662;
2747;;F644;
274C;;F76C;F9D3
274E;;F76D;
2753;;F65B;F960
2754;;;F9D6
2755;;;F9D7
2757;F9A7;F65A;F961
2764;F991;F7B2;F962
2795;;F758;
2796;;F759;
2797;;F770;
27A1;;F76E;F7D4
27B0;F9AF;F3F2;
2934;F99A;F3EE;
2935;F9A5;F3EF;
2B05;;F76F;F7D5
2B06;;F75B;F7D2
2B07;;F75C;F7D3
2B1B;;F765;
2B1C;;F764;
2B50;;F663;F9CF
2B55;;F381;F9D2
3030;F9AE;;
303D;;;F76C
3297;;F36C;F9AD
3299;F9D9;F6CA;F9B5
1F004;;F344;F76D
1F0CF;;F473;
1F170;;F3E7;FBD2
1F171;;F3E8;FBD3
1F17E;;F3E9;FBD5
1F17F;F8CD;F67E;F790
1F18E;;F3EA;FBD4
1F191;F980;F7C8;
1F192;;F358;F7B4
1F193;F97B;F795;
1F194;F97C;F35B;F7C9
1F195;F982;F7E5;F7B2
1F196;F9D4;;
1F197;F9B0;F7CA;F7ED
1F198;;F6C1;
1F199;;F6E8;F7B3
1F19A;;F345;F76E
1F1E8 1F1F3;;F3D2;FBB3
1F1E9 1F1EA;;F3CF;FBAE
1F1EA 1F1F8;;F348;FBB1
1F1EB 1F1F7;;F3CE;FBAD
1F1EC 1F1E7;;F3D1;FBB0
1F1EE 1F1F9;;F3D0;FBAF
1F1EF 1F1F5;;F6A5;FBAB
1F1F0 1F1F7;;F3D3;FBB4
1F1F7 1F1FA;;F349;FBB2
1F1FA 1F1F8;;F790;FBAC
1F201;;;F7A3
1F202;;F35A;F7C8
1F21A;;;F7B6
1F22F;;F35E;F7CC
1F232;F9DD;;
1F233;F9DE;F35D;F7CB
1F234;F9DF;;
1F235;F9E0;F35C;F7CA
1F236;;;F7B5
1F237;;;F7B7
1F238;;;F7B8
1F239;;F359;F7C7
1F23A;;F35F;F7CD
1F250;;F6D0;F7C6
1F251;;F7D8;
1F300;F8A4;F641;FB84
1F301;F8A5;F7B5;
1F302;F8A6;F3BC;FB7C
1F303;F957;F3C5;FB8C
1F304;;;F98E
1F305;;F3C8;FB8A
1F306;;F34D;F787
1F307;;;FB8B
1F308;;F3C6;FB8D
1F309;;F698;
1F30A;F9E4;F481;FB7E
1F30B;;F457;
1F30C;;F463;
1F30F;;F7D0;
1F311;F940;F7C5;
1F313;F942;F7C7;
1F314;F941;F7C6;
1F315;F944;;
1F319;F943;F65E;F98D
1F31B;;F661;
1F31F;;;F9D5
1F320;;F640;
1F330;;F3F9;
1F331;F9EB;F482;
1F334;;F6BB;F9A7
1F335;;F369;F9A8
1F337;F9E8;F6BD;F9A4
1F338;F9ED;F6A3;F970
1F339;;F7EA;F972
1F33A;;F367;F9A3
1F33B;;F6BC;F9A5
1F33C;;F44D;
1F33D;;F3F7;
1F33E;;;FB85
1F33F;;F487;
1F340;F9E6;F6EC;F750
1F341;F9EC;F6A7;F758
1F342;;F340;F759
1F343;;;FB88
1F344;;F3F8;
1F345;;F38F;F9E9
1F346;;F390;F9EA
1F347;;F3F5;
1F348;;F3F3;
1F349;;F6A6;F9E8
1F34A;;F38E;F9E6
1F34C;F9E9;F3F6;
1F34D;;F3F4;
1F34E;F9EA;F38D;F9E5
1F34F;;F45E;
1F351;;F3FA;
1F352;F9E7;F6AB;
1F353;;F6AD;F9E7
1F354;F8D4;F6AF;F760
1F355;;F3FC;
1F356;;F69D;
1F357;;F440;
1F358;;F387;F9DD
1F359;F9EE;F6AE;F9E2
1F35A;;F388;F9DE
1F35B;;F38A;F9E1
1F35C;F9F1;F7D1;F9E0
1F35D;;F389;F9DF
1F35E;F9F2;F383;F9D9
1F35F;;F385;F9DB
1F360;;F3FB;
1F361;;F386;F9DC
1F362;;F38B;F9E3
1F363;;F38C;F9E4
1F364;;F474;
1F365;;F6C6;
1F366;;F384;F9DA
1F367;;F3BE;FB80
1F368;;F44E;
1F369;;F44F;
1F36A;;F450;
1F36B;;F451;
1F36C;;F452;
1F36D;;F453;
1F36E;;F45A;
1F36F;;F45D;
1F370;F9EF;F6A9;F987
1F371;;F391;F9EC
1F372;;F392;F9ED
1F373;;F6AA;F788
1F374;F8D0;F685;F984
1F375;F9C3;F382;F9D8
1F376;F9F0;F36A;F9AB
1F377;F9FB;F69A;
1F378;F8D2;F69B;F985
1F379;;F442;
1F37A;F8D3;F69C;F988
1F37B;;F36B;F9AC
1F380;F8E5;F7BC;F9B4
1F381;F8E6;F6A8;F752
1F382;F8E7;F7BD;F9EB
1F383;;F3C2;FB86
1F384;F948;F6A2;F973
1F385;;F3C4;FB89
1F386;;F7FC;F757
1F387;;F3BF;FB81
1F388;;F36E;F9B0
1F389;;F36F;F9B2
1F38A;;F647;
1F38B;;F441;
1F38C;;F34C;F784
1F38D;;F3B7;FB76
1F38E;;F3B8;FB78
1F38F;;F3BB;FB7B
1F390;;F3C1;FB83
1F391;;F3C3;FB87
1F392;;F3BA;FB7A
1F393;;F3B9;FB79
1F3A0;F8DA;;
1F3A1;;F645;F764
1F3A2;;F3B6;FB73
1F3A3;;F446;
1F3A4;F8D7;F6DC;F97C
1F3A5;F8D8;F6F0;F97D
1F3A6;;;FBA7
1F3A7;F8DB;F6E1;F9AA
1F3A8;F8DC;F7B9;FBA2
1F3A9;F8DD;F3C9;FBA3
1F3AA;F8DE;F7BB;
1F3AB;F8DF;F676;F765
1F3AC;F950;F697;F9C4
1F3AD;;F7BA;
1F3AE;F8EC;F69F;
1F3AF;;F69E;F770
1F3B0;;F646;F773
1F3B1;;F3B1;FB6C
1F3B2;;F6A1;
1F3B3;;F447;
1F3B4;;F472;
1F3B5;F99B;F7EE;F97E
1F3B6;F9A4;F6DE;F9C6
1F3B7;;;F981
1F3B8;;F6DF;F982
1F3B9;;F444;
1F3BA;;F3B0;F983
1F3BB;;F6E0;
1F3BC;;F3A0;
1F3BD;F8B3;;
1F3BE;F8B6;F690;F955
1F3BF;F8B8;F380;F953
1F3C0;F8B9;F7B7;FB6A
1F3C1;F8BA;F692;F772
1F3C2;F9B7;F691;
1F3C3;F9D8;F643;F755
1F3C4;;F445;F957
1F3C6;;F346;F771
1F3C8;;F694;FB6B
1F3CA;;F3B2;FB6D
1F3E0;F8C4;F684;F976
1F3E1;;F7E0;
1F3E2;F8C5;F686;F978
1F3E3;F8C6;F351;F794
1F3E5;F8C7;F352;F796
1F3E6;F8C8;F683;F78E
1F3E7;F8C9;F67B;F795
1F3E8;F8CA;F354;F799
1F3E9;;F3C7;FBA1
1F3EA;F8CB;F67C;F797
1F3EB;F9E3;F353;F798
1F3EC;;F3CA;FBA4
1F3ED;;F3CD;FBA8
1F3EE;;F696;
1F3EF;;F3CB;FBA5
1F3F0;;F3CC;FBA6
1F40C;F9F3;F483;
1F40D;;F3E3;FBCD
1F40E;;;F774
1F411;;;FBC9
1F412;;;FBC8
1F414;;F3E4;FBCE
1F417;;F3E5;FBCF
1F418;;F3E0;FBC6
1F419;;F7F7;F74A
1F41A;;F3C0;FB82
1F41B;;F3DF;FBC5
1F41C;;F6B6;
1F41D;;F45B;
1F41E;;F45C;
1F41F;F9F6;;F959
1F420;;F3DE;FBC2
1F421;;F6AC;
1F422;;F347;
1F423;;F34E;
1F424;F9F4;F6B9;FBC3
1F425;;F47A;
1F426;;;FBC1
1F427;F9F5;F6B5;F996
1F428;;F3E1;FBC7
1F429;;F6B8;
1F42B;;F3E6;FBD0
1F42C;;F3DC;FBC0
1F42D;;F7F2;F994
1F42E;;F3E2;FBCB
1F42F;;F7F0;F991
1F430;;F6B0;FBCC
1F431;F946;F6B4;F990
1F432;;F443;
1F433;;F648;F995
1F434;F9F9;F6B1;F95A
1F435;;F6B2;F749
1F436;F945;F6BA;F993
1F437;F9FA;F6B7;F74B
1F438;;F6B3;FBD1
1F439;;;FBC4
1F43A;;;FBCA
1F43B;;F7F1;F992
1F43C;;F44A;
1F43D;;F44C;
1F43E;;F6C7;
1F440;F8F2;F7C1;FB59
1F442;F8F3;F7C2;FB5B
1F443;;F3A4;FB5A
1F444;;F3A5;FB5C
1F445;;F44B;
1F446;;F360;F7CE
1F447;;F361;F7CF
1F448;;F6D8;F7D0
1F449;;F6D9;F7D1
1F44A;F9A2;F6CC;F94D
1F44B;;F3AA;FB5E
1F44C;;F3A8;FB60
1F44D;F9CC;F6D2;F94E
1F44E;;F3A9;FB61
1F44F;;F3A7;FB5F
1F450;;;FB62
1F451;F9BF;F7F9;F74E
1F452;;F371;F9B8
1F453;F8FB;F6D7;
1F454;;F366;F9A2
1F455;F9B3;F7E6;F946
1F456;F9B6;F47B;
1F457;;F46F;F9B9
1F458;;F376;F9C1
1F459;;F377;F9C2
1F45A;;F6E6;
1F45B;F9B4;F6DD;
1F45C;F8E3;F674;F9C3
1F45D;F951;;
1F45E;;F7E7;
1F45F;F8FA;F3EC;F947
1F460;F8D5;F6F3;F77E
1F461;;;F9BA
1F462;;F372;F9BB
1F463;F8F9;F3EB;FBD6
1F464;F955;;
1F466;;;F941
1F467;;;F942
1F468;;F6D5;F944
1F469;;F6D3;F945
1F46A;;F6DA;
1F46B;;;FB68
1F46E;;F350;F793
1F46F;;F3AF;FB69
1F470;;F3BD;
1F471;;F3D4;FBB5
1F472;;F3D5;FBB6
1F473;;F3D6;FBB7
1F474;;F3D7;FBB8
1F475;;F3D8;FBB9
1F476;;F3D9;FBBA
1F477;;F3DA;FBBB
1F478;;F3DB;FBBC
1F479;;F448;
1F47A;;F449;
1F47B;;F6A4;F75B
1F47C;;F7EF;F98F
1F47D;;F6E7;F74C
1F47E;;F6C5;F76B
1F47F;;F6C8;F75A
1F480;;F6D1;F75C
1F481;;;F7F3
1F482;;;FBBE
1F483;;F3DD;FBBF
1F484;F9B5;F6E2;F9BC
1F485;;F373;F9BD
1F486;;F6E4;F9BE
1F487;;F374;F9BF
1F488;;F375;F9C0
1F489;;F6E9;F77B
1F48A;;F36D;F9AF
1F48B;F99E;F6C4;F943
1F48C;F9BC;F47C;
1F48D;F9C0;F6ED;F974
1F48E;;;F975
1F48F;;F7FA;F751
1F490;;F368;F9A6
1F491;;F3AE;FB65
1F492;;;FB7D
1F493;F992;F479;F9C7
1F494;F993;F64F;F963
1F495;F994;F650;
1F496;;F379;
1F497;;;F9C8
1F498;;F6C3;F9C9
1F499;;F37A;F9CA
1F49A;;F37B;F9CB
1F49B;;F37C;F9CC
1F49C;;F37D;F9CD
1F49D;;F458;FB77
1F49E;;F7CC;
1F49F;;;F7A4
1F4A0;F99D;;
1F4A1;F9A0;F64E;F74F
1F4A2;F9A1;F6BE;F9D4
1F4A3;F9A3;F652;F9B1
1F4A4;F9A6;F64D;F77C
1F4A5;F9AA;F7CD;
1F4A6;F9AB;F7CE;F9D1
1F4A7;F9AC;F6BF;
1F4A8;F9AD;F6CD;F9D0
1F4A9;;F6CE;F99B
1F4AA;;F6C2;F78D
1F4AB;;F460;
1F4AC;;F6D6;
1F4AE;;F6C9;
1F4AF;;F6CB;
1F4B0;F9BA;F6A0;F76F
1F4B1;;;F78A
1F4B2;;F796;
1F4B3;;F799;
1F4B4;F97A;F79A;
1F4B5;;F7A2;
1F4B8;;F45F;
1F4B9;;F34F;F78B
1F4BA;F956;;F75F
1F4BB;F9BB;F7E8;F94C
1F4BC;;F341;F75E
1F4BD;;F79F;F9B6
1F4BE;;F77E;
1F4BF;F8ED;F6E5;F766
1F4C0;;;F767
1F4C1;;F7AC;
1F4C2;;F7AD;
1F4C3;;F77D;
1F4C4;;F786;
1F4C5;;F780;
1F4C6;;F787;
1F4C7;;F789;
1F4C8;;F792;
1F4C9;;F793;
1F4CA;;F791;
1F4CB;;F781;
1F4CC;;F78A;
1F4CD;;F77C;
1F4CE;F9D5;F678;
1F4CF;;F78D;
1F4D0;;F67A;
1F4D1;;F7E2;
1F4D2;;F78B;
1F4D3;;F788;
1F4D4;;F675;
1F4D5;;F785;
1F4D6;F8E4;F677;F789
1F4D7;;F782;
1F4D8;;F783;
1F4D9;;F784;
1F4DA;;F78C;
1F4DB;;F6F6;
1F4DC;;F77B;
1F4DD;F8EA;F365;F9A1
1F4DE;;F6F7;
1F4DF;F8BB;F7B8;
1F4E0;F974;F6F9;F94B
1F4E1;;F681;F78C
1F4E2;;;F783
1F4E3;;;F9B7
1F4E4;;F7AF;
1F4E5;;F7B0;
1F4E6;;F6F8;
1F4E7;;F475;
1F4E8;;F7AE;
1F4E9;F973;F466;F743
1F4EA;;F6F4;
1F4EB;;F7E1;F741
1F4EE;;;F742
1F4F0;;F7A8;
1F4F1;F8E9;F7A5;F94A
1F4F2;F972;F7DF;F744
1F4F3;;F363;F7F0
1F4F4;;F364;F7F1
1F4F6;;F357;F7AB
1F4F7;F8E2;F6EE;F948
1F4F9;;F79B;
1F4FA;F8EB;F6DB;F76A
1F4FB;;F7E9;F768
1F4FC;;F79D;F769
1F503;;F7E4;
1F50A;;F6EA;F782
1F50B;;F7A1;
1F50C;;F7A6;
1F50D;F981;F6F1;F754
1F50E;;F7DC;
1F50F;;F7E3;
1F510;;F7D3;
1F511;F97D;F6F2;F980
1F512;;F6F5;F785
1F513;;;F786
1F514;F9B8;F6EB;F9C5
1F516;;F7DE;
1F517;;F7A7;
1F518;;F7DB;
1F519;;F7DD;
1F51A;F95D;;
1F51B;F95C;;
1F51C;F95B;;
1F51D;;;F7EC
1F51E;;F356;F7A7
1F51F;;F747;
1F520;;F7D4;
1F521;;F7D5;
1F522;;F7D6;
1F523;;F7D7;
1F524;;F459;
1F525;;F653;F75D
1F526;;F7A0;
1F527;F9BD;F7A4;
1F528;;F7FB;F756
1F529;;F79E;
1F52A;;F79C;
1F52B;;F6E3;F753
1F52E;;F362;
1F52F;;;F7DE
1F530;;F658;F7A9
1F531;;;F971
1F532;;;F7BA
1F533;;;F7BB
1F534;;F766;F7B9
1F535;;F767;
1F536;;F762;
1F537;;F763;
1F538;;F752;
1F539;;F753;
1F53A;;F776;
1F53B;;F777;
1F53C;;F75F;
1F53D;;F75E;
1F550;;;F964
1F551;;;F965
1F552;;;F966
1F553;;;F967
1F554;;;F968
1F555;;;F969
1F556;;;F96A
1F557;;;F96B
1F558;;;F96C
1F559;;;F96D
1F55A;;;F96E
1F55B;;;F96F
1F5FB;F9E5;F7ED;F97B
1F5FC;;F699;FBA9
1F5FD;;;FBBD
1F5FE;;F78F;
1F5FF;;F470;
1F601;F9F8;F485;FB44
1F602;;F468;FB52
1F603;F995;F649;F998
1F604;;;FB55
1F605;F9C7;;
1F606;F9CF;;
1F609;F9CE;F7F3;FB45
1F60A;;F3A1;F997
1F60B;F9F7;;
1F60C;F9C6;F399;FB4A
1F60D;F9CB;F7F4;F746
1F60F;F9D1;F393;FB42
1F612;F9CA;F39D;FB4E
1F613;F9C8;F7F6;F748
1F614;F9C5;F394;FB43
1F616;F998;F397;FB47
1F618;;F3A3;FB58
1F61A;;F3A2;FB57
1F61C;F9CD;F6C0;F745
1F61D;;;FB49
1F61E;F997;;F999
1F620;F996;F64A;F99A
1F621;F9C9;F461;FB56
1F622;F9D3;F46D;FB53
1F623;F9D0;F396;FB46
1F624;;F395;
1F625;;;FB41
1F628;;F39A;FB4B
1F629;;F46B;
1F62A;;F398;FB48
1F62B;;F64C;
1F62D;F9D2;F64B;FB51
1F630;;F39F;FB4F
1F631;F9FC;F7F5;F747
1F632;;F39E;FB50
1F633;;F39C;FB4D
1F635;F999;F7CB;
1F637;;F39B;FB4C
1F638;;F484;
1F639;;F467;
1F63A;;F465;
1F63B;;F469;
1F63C;;F46E;
1F63D;;F464;
1F63E;;F462;
1F63F;;F46C;
1F640;;F46A;
1F645;;F3AB;FB63
1F646;;F3AC;FB64
1F647;;F3AD;FB66
1F648;;F454;
1F649;;F456;
1F64A;;F455;
1F64B;;F48A;
1F64C;;F48B;FB67
1F64D;;F48C;
1F64E;;F48D;
1F64F;;F3A6;FB5D
1F680;;F7F8;F74D
1F683;F8BC;F68E;F95E
1F684;F8BE;;FB75
1F685;;F689;F95F
1F687;;F7EC;FB74
1F689;;F471;F979
1F68C;F8C1;F688;F79A
1F68F;;F680;F791
1F691;;F3B4;FB71
1F692;;F3B3;FB70
1F693;;F3B5;FB72
1F695;;;F79B
1F697;F8BF;F68A;F95B
1F699;F8C0;;FB6E
1F69A;;F68B;FB6F
1F6A2;F8C2;F355;F7A2
1F6A4;;;F775
1F6A5;F8CE;F642;F78F
1F6A7;;F34A;F777
1F6A8;;F477;
1F6A9;F983;F3ED;
1F6AA;F9B9;;
1F6AB;;F75D;
1F6AC;F8E0;F655;F9AE
1F6AD;F8E1;F656;F7A8
1F6B2;F9C2;F687;F776
1F6B6;;F476;F7A1
1F6B9;;;F778
1F6BA;;;F779
1F6BB;F8CF;F67D;F792
1F6BC;;;F77A
1F6BD;;;F781
1F6BE;;;F9A9
1F6C0;;F34B;F780
# EOF

Просмотреть файл

@ -1,4 +1,5 @@
require 'test_helper'
require 'json'
class IntegrityTest < TestCase
test "missing aliases to unicode sources" do
@ -20,10 +21,8 @@ class IntegrityTest < TestCase
"Missing or incorrect unicodes:\n".tap do |message|
missing.each do |missing|
message << "#{missing} (#{point_pair(missing)})"
Emoji.unicodes.each do |unicode|
if (unicode.codepoints & missing.codepoints).any?
message << " - might be #{unicode} (#{point_pair(unicode)}) named #{Emoji.name_for(unicode)}"
end
if unicode = Emoji.unicodes.detect { |u| u.codepoints.first == missing.codepoints.first }
message << " - might be #{unicode} (#{point_pair(unicode)}) named #{Emoji.name_for(unicode)}"
end
message << "\n"
end
@ -34,24 +33,11 @@ class IntegrityTest < TestCase
Array(unicode.codepoints).map { |c| c.to_s(16) }.join('-')
end
# http://www.unicode.org/Public/UNIDATA/EmojiSources.txt
# I think this list is missing the newer emoji added in iOS6
def emoji_source_file
File.expand_path("../fixtures/EmojiSources.txt", __FILE__)
def db
@db ||= JSON.parse(File.read(File.expand_path("../../db/Category-Emoji.json", __FILE__)))
end
def source_unicode_emoji
@source_unicode_emoji ||= [].tap do |codepoints|
File.open(emoji_source_file).each_line do |line|
unless line =~ /^#/ || line.strip == ""
values = line.split(";").first.split()
codepoints << values unless white_space_codepoints.include?(values[0])
end
end
end.map { |c| c.map(&:hex).pack("U*") }
end
def white_space_codepoints
%w(2002 2003 2005)
@source_unicode_emoji ||= db["EmojiDataArray"].flat_map { |data| data["CVCategoryData"]["Data"].split(",") }
end
end