validate.json 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. {
  2. "data": [
  3. {
  4. "module":"toImage",
  5. "tests": [
  6. {
  7. "description": "test toImage",
  8. "text": "Hello world! ๐Ÿ˜„ :smile:",
  9. "expected": "Hello world! <img class=\\\"emojione\\\" alt=\\\"๐Ÿ˜„\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f604.png?v=2.2.5\\\"/> <img class=\\\"emojione\\\" alt=\\\"๐Ÿ˜„\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f604.png?v=2.2.5\\\"/>"
  10. },
  11. {
  12. "description": "mixed ascii, regular unicode and duplicate emoji",
  13. "text": ":alien: is ๐Ÿ‘ฝ and ์ € is not :alien: or :alien: also :randomy: is not emoji",
  14. "expected": "<img class=\\\"emojione\\\" alt=\\\"๐Ÿ‘ฝ\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f47d.png?v=2.2.5\\\"/> is <img class=\\\"emojione\\\" alt=\\\"๐Ÿ‘ฝ\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f47d.png?v=2.2.5\\\"/> and ์ € is not <img class=\\\"emojione\\\" alt=\\\"๐Ÿ‘ฝ\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f47d.png?v=2.2.5\\\"/> or <img class=\\\"emojione\\\" alt=\\\"๐Ÿ‘ฝ\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f47d.png?v=2.2.5\\\"/> also :randomy: is not emoji"
  15. }
  16. ]
  17. },
  18. {
  19. "module":"unifyUnicode",
  20. "tests": [
  21. {
  22. "description": "test unifyUnicode",
  23. "text": "Hello world! ๐Ÿ˜„ :smile:",
  24. "expected": "Hello world! ๐Ÿ˜„ ๐Ÿ˜„"
  25. },
  26. {
  27. "description": "mixed ascii, regular unicode and duplicate emoji",
  28. "text": ":alien: is ๐Ÿ‘ฝ and ์ € is not :alien: or :alien: also :randomy: is not emoji",
  29. "expected": "๐Ÿ‘ฝ is ๐Ÿ‘ฝ and ์ € is not ๐Ÿ‘ฝ or ๐Ÿ‘ฝ also :randomy: is not emoji"
  30. },
  31. {
  32. "description": "multiline emoji string",
  33. "text": ":dancer:\\\n:dancer:",
  34. "expected": "๐Ÿ’ƒ\\\n๐Ÿ’ƒ"
  35. },
  36. {
  37. "description": "triple emoji string",
  38. "text": ":dancer::dancer::alien:",
  39. "expected": "๐Ÿ’ƒ๐Ÿ’ƒ๐Ÿ‘ฝ"
  40. }
  41. ]
  42. },
  43. {
  44. "module": "shortnameToUnicode",
  45. "tests": [
  46. {
  47. "description": "single unicode character conversion",
  48. "text": "Hello world! ๐Ÿ˜„ :smile:",
  49. "expected": "Hello world! ๐Ÿ˜„ ๐Ÿ˜„"
  50. },
  51. {
  52. "description": "shortname mid sentence with a comma",
  53. "text": "The :snail:, is Emoji One's official mascot.",
  54. "expected": "The ๐ŸŒ, is Emoji One's official mascot."
  55. },
  56. {
  57. "description": "shortname at start of sentence with apostrophe",
  58. "text": ":snail:'s are cool!",
  59. "expected": "๐ŸŒ's are cool!"
  60. },
  61. {
  62. "description": "shortname shares a colon",
  63. "text": ":invalid:snail:",
  64. "expected": ":invalid๐ŸŒ"
  65. },
  66. {
  67. "description": "mixed ascii, regular unicode and duplicate emoji",
  68. "text": ":alien: is ๐Ÿ‘ฝ and ์ € is not :alien: or :alien: also :randomy: is not emoji",
  69. "expected": "๐Ÿ‘ฝ is ๐Ÿ‘ฝ and ์ € is not ๐Ÿ‘ฝ or ๐Ÿ‘ฝ also :randomy: is not emoji"
  70. },
  71. {
  72. "description": "multiline emoji string",
  73. "text": ":dancer:\\n:dancer:",
  74. "expected": "๐Ÿ’ƒ\\n๐Ÿ’ƒ"
  75. },
  76. {
  77. "description": "triple emoji string",
  78. "text": ":dancer::dancer::alien:",
  79. "expected": "๐Ÿ’ƒ๐Ÿ’ƒ๐Ÿ‘ฝ"
  80. }
  81. ]
  82. },
  83. {
  84. "module": "shortnameToImage",
  85. "tests": [
  86. {
  87. "description": "single shortname character conversion",
  88. "text": "Hello world! ๐Ÿ˜„ :smile:",
  89. "expected": "Hello world! ๐Ÿ˜„ <img class=\\\"emojione\\\" alt=\\\"๐Ÿ˜„\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f604.png?v=2.2.5\\\"/>"
  90. },
  91. {
  92. "description": "shortname at start of sentence with apostrophe",
  93. "text": ":snail:'s are cool!",
  94. "expected": "<img class=\\\"emojione\\\" alt=\\\"๐ŸŒ\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f40c.png?v=2.2.5\\\"/>'s are cool!"
  95. },
  96. {
  97. "description": "shortname shares a colon",
  98. "text": ":invalid:snail:",
  99. "expected": ":invalid<img class=\\\"emojione\\\" alt=\\\"๐ŸŒ\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f40c.png?v=2.2.5\\\"/>"
  100. },
  101. {
  102. "description": "mixed ascii, regular unicode and duplicate emoji",
  103. "text": ":alien: is ๐Ÿ‘ฝ and ์ € is not :alien: or :alien: also :randomy: is not emoji",
  104. "expected": "<img class=\\\"emojione\\\" alt=\\\"๐Ÿ‘ฝ\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f47d.png?v=2.2.5\\\"/> is ๐Ÿ‘ฝ and ์ € is not <img class=\\\"emojione\\\" alt=\\\"๐Ÿ‘ฝ\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f47d.png?v=2.2.5\\\"/> or <img class=\\\"emojione\\\" alt=\\\"๐Ÿ‘ฝ\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f47d.png?v=2.2.5\\\"/> also :randomy: is not emoji"
  105. },
  106. {
  107. "description": "multiline emoji string",
  108. "text": ":dancer:\\n:dancer:",
  109. "expected": "<img class=\\\"emojione\\\" alt=\\\"๐Ÿ’ƒ\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f483.png?v=2.2.5\\\"/>\\n<img class=\\\"emojione\\\" alt=\\\"๐Ÿ’ƒ\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f483.png?v=2.2.5\\\"/>"
  110. },
  111. {
  112. "description": "triple emoji string",
  113. "text": ":dancer::dancer::alien:",
  114. "expected": "<img class=\\\"emojione\\\" alt=\\\"๐Ÿ’ƒ\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f483.png?v=2.2.5\\\"/><img class=\\\"emojione\\\" alt=\\\"๐Ÿ’ƒ\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f483.png?v=2.2.5\\\"/><img class=\\\"emojione\\\" alt=\\\"๐Ÿ‘ฝ\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f47d.png?v=2.2.5\\\"/>"
  115. }
  116. ]
  117. },
  118. {
  119. "module": "toShort",
  120. "tests": [
  121. {
  122. "description": "single unicode character conversion",
  123. "text": "Hello world! ๐Ÿ˜„ :smile:",
  124. "expected": "Hello world! :smile: :smile:"
  125. },
  126. {
  127. "description": "mixed ascii, regular unicode and duplicate emoji",
  128. "text": "๐Ÿ‘ฝ is not :alien: and ์ € is not ๐Ÿ‘ฝ or ๐Ÿ‘ฝ",
  129. "expected": ":alien: is not :alien: and ์ € is not :alien: or :alien:"
  130. },
  131. {
  132. "description": "multiline emoji string",
  133. "text": "๐Ÿ’ƒ\\n๐Ÿ’ƒ",
  134. "expected": ":dancer:\\n:dancer:"
  135. },
  136. {
  137. "description": "alias vs. canonical",
  138. "text": "๐Ÿ‡ฏ๐Ÿ‡ต ใฉใ†ใ‚‚ใ‚ใ‚ŠใŒใจใ†",
  139. "expected": ":flag_jp: ใฉใ†ใ‚‚ใ‚ใ‚ŠใŒใจใ†"
  140. },
  141. {
  142. "description": "unicode character conversion within excluded tag",
  143. "text": "<div>๐Ÿ˜„</div>",
  144. "expected": "<div>:smile:</div>"
  145. }
  146. ]
  147. },
  148. {
  149. "module": "toImage",
  150. "tests": [
  151. {
  152. "description": "single character shortname conversion",
  153. "text": "Hello world! ๐Ÿ˜„ :smile:",
  154. "expected": "Hello world! <img class=\\\"emojione\\\" alt=\\\"๐Ÿ˜„\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f604.png?v=2.2.5\\\"/> <img class=\\\"emojione\\\" alt=\\\"๐Ÿ˜„\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f604.png?v=2.2.5\\\"/>"
  155. },
  156. {
  157. "description": "shortname shares a colon",
  158. "text": ":invalid:snail:",
  159. "expected": ":invalid<img class=\\\"emojione\\\" alt=\\\"๐ŸŒ\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f40c.png?v=2.2.5\\\"/>"
  160. },
  161. {
  162. "description": "single unicode character conversion",
  163. "text": "๐ŸŒ",
  164. "expected": "<img class=\\\"emojione\\\" alt=\\\"๐ŸŒ\\\" src=\\\"//cdn.jsdelivr.net/emojione/assets/png/1f40c.png?v=2.2.5\\\"/>"
  165. }
  166. ]
  167. }
  168. ]
  169. }