mirror of https://github.com/ghostfolio/ghostfolio
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
164 lines
8.0 KiB
164 lines
8.0 KiB
{
|
|
"data": [
|
|
{
|
|
"module":"toImage",
|
|
"tests": [
|
|
{
|
|
"description": "test toImage",
|
|
"text": "Hello world! ๐ :smile:",
|
|
"expected": "Hello world! <img class=\"joypixels\" alt=\"๐\" title=\":smile:\" src=\"https://cdn.jsdelivr.net/joypixels/assets/{{version}}/png/unicode/32/1f604.png\"/> <img class=\"joypixels\" alt=\"๐\" title=\":smile:\" src=\"https://cdn.jsdelivr.net/joypixels/assets/{{version}}/png/unicode/32/1f604.png\"/>"
|
|
},
|
|
{
|
|
"description": "mixed ascii, regular unicode and duplicate emoji",
|
|
"text": ":alien: is ๐ฝ and ์ is not :alien: or :alien: also :randomy: is not emoji",
|
|
"expected": "<img class=\"joypixels\" alt=\"๐ฝ\" title=\":alien:\" src=\"https://cdn.jsdelivr.net/joypixels/assets/{{version}}/png/unicode/32/1f47d.png\"/> is <img class=\"joypixels\" alt=\"๐ฝ\" title=\":alien:\" src=\"https://cdn.jsdelivr.net/joypixels/assets/{{version}}/png/unicode/32/1f47d.png\"/> and ์ is not <img class=\"joypixels\" alt=\"๐ฝ\" title=\":alien:\" src=\"https://cdn.jsdelivr.net/joypixels/assets/{{version}}/png/unicode/32/1f47d.png\"/> or <img class=\"joypixels\" alt=\"๐ฝ\" title=\":alien:\" src=\"https://cdn.jsdelivr.net/joypixels/assets/{{version}}/png/unicode/32/1f47d.png\"/> also :randomy: is not emoji"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"module":"unifyUnicode",
|
|
"tests": [
|
|
{
|
|
"description": "test unifyUnicode",
|
|
"text": "Hello world! ๐ :smile:",
|
|
"expected": "Hello world! ๐ ๐"
|
|
},
|
|
{
|
|
"description": "mixed ascii, regular unicode and duplicate emoji",
|
|
"text": ":alien: is ๐ฝ and ์ is not :alien: or :alien: also :randomy: is not emoji",
|
|
"expected": "๐ฝ is ๐ฝ and ์ is not ๐ฝ or ๐ฝ also :randomy: is not emoji"
|
|
},
|
|
{
|
|
"description": "multiline emoji string",
|
|
"text": ":dancer:\\\n:dancer:",
|
|
"expected": "๐\\\n๐"
|
|
},
|
|
{
|
|
"description": "triple emoji string",
|
|
"text": ":dancer::dancer::alien:",
|
|
"expected": "๐๐๐ฝ"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"module": "shortnameToUnicode",
|
|
"tests": [
|
|
{
|
|
"description": "single unicode character conversion",
|
|
"text": "Hello world! ๐ :smile:",
|
|
"expected": "Hello world! ๐ ๐"
|
|
},
|
|
{
|
|
"description": "shortname at start of sentence with apostrophe",
|
|
"text": ":snail:'s are cool!",
|
|
"expected": "๐\\'s are cool!"
|
|
},
|
|
{
|
|
"description": "shortname shares a colon",
|
|
"text": ":invalid:snail:",
|
|
"expected": ":invalid๐"
|
|
},
|
|
{
|
|
"description": "mixed ascii, regular unicode and duplicate emoji",
|
|
"text": ":alien: is ๐ฝ and ์ is not :alien: or :alien: also :randomy: is not emoji",
|
|
"expected": "๐ฝ is ๐ฝ and ์ is not ๐ฝ or ๐ฝ also :randomy: is not emoji"
|
|
},
|
|
{
|
|
"description": "multiline emoji string",
|
|
"text": ":dancer:\\n:dancer:",
|
|
"expected": "๐\\n๐"
|
|
},
|
|
{
|
|
"description": "triple emoji string",
|
|
"text": ":dancer::dancer::alien:",
|
|
"expected": "๐๐๐ฝ"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"module": "shortnameToImage",
|
|
"tests": [
|
|
{
|
|
"description": "single shortname character conversion",
|
|
"text": "Hello world! ๐ :smile:",
|
|
"expected": "Hello world! ๐ <img class=\"joypixels\" alt=\"๐\" title=\":smile:\" src=\"https://cdn.jsdelivr.net/joypixels/assets/{{version}}/png/unicode/32/1f604.png\"/>"
|
|
},
|
|
{
|
|
"description": "shortname at start of sentence with apostrophe",
|
|
"text": ":snail:'s are cool!",
|
|
"expected": "<img class=\"joypixels\" alt=\"๐\" title=\":snail:\" src=\"https://cdn.jsdelivr.net/joypixels/assets/{{version}}/png/unicode/32/1f40c.png\"/>\\'s are cool!"
|
|
},
|
|
{
|
|
"description": "shortname shares a colon",
|
|
"text": ":invalid:snail:",
|
|
"expected": ":invalid<img class=\"joypixels\" alt=\"๐\" title=\":snail:\" src=\"https://cdn.jsdelivr.net/joypixels/assets/{{version}}/png/unicode/32/1f40c.png\"/>"
|
|
},
|
|
{
|
|
"description": "mixed ascii, regular unicode and duplicate emoji",
|
|
"text": ":alien: is ๐ฝ and ์ is not :alien: or :alien: also :randomy: is not emoji",
|
|
"expected": "<img class=\"joypixels\" alt=\"๐ฝ\" title=\":alien:\" src=\"https://cdn.jsdelivr.net/joypixels/assets/{{version}}/png/unicode/32/1f47d.png\"/> is ๐ฝ and ์ is not <img class=\"joypixels\" alt=\"๐ฝ\" title=\":alien:\" src=\"https://cdn.jsdelivr.net/joypixels/assets/{{version}}/png/unicode/32/1f47d.png\"/> or <img class=\"joypixels\" alt=\"๐ฝ\" title=\":alien:\" src=\"https://cdn.jsdelivr.net/joypixels/assets/{{version}}/png/unicode/32/1f47d.png\"/> also :randomy: is not emoji"
|
|
},
|
|
{
|
|
"description": "multiline emoji string",
|
|
"text": ":dancer:\\n:dancer:",
|
|
"expected": "<img class=\"joypixels\" alt=\"๐\" title=\":dancer:\" src=\"https://cdn.jsdelivr.net/joypixels/assets/{{version}}/png/unicode/32/1f483.png\"/>\\n<img class=\"joypixels\" alt=\"๐\" title=\":dancer:\" src=\"https://cdn.jsdelivr.net/joypixels/assets/{{version}}/png/unicode/32/1f483.png\"/>"
|
|
},
|
|
{
|
|
"description": "triple emoji string",
|
|
"text": ":dancer::dancer::alien:",
|
|
"expected": "<img class=\"joypixels\" alt=\"๐\" title=\":dancer:\" src=\"https://cdn.jsdelivr.net/joypixels/assets/{{version}}/png/unicode/32/1f483.png\"/><img class=\"joypixels\" alt=\"๐\" title=\":dancer:\" src=\"https://cdn.jsdelivr.net/joypixels/assets/{{version}}/png/unicode/32/1f483.png\"/><img class=\"joypixels\" alt=\"๐ฝ\" title=\":alien:\" src=\"https://cdn.jsdelivr.net/joypixels/assets/{{version}}/png/unicode/32/1f47d.png\"/>"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"module": "toShort",
|
|
"tests": [
|
|
{
|
|
"description": "single unicode character conversion",
|
|
"text": "Hello world! ๐ :smile:",
|
|
"expected": "Hello world! :smile: :smile:"
|
|
},
|
|
{
|
|
"description": "mixed ascii, regular unicode and duplicate emoji",
|
|
"text": "๐ฝ is not :alien: and ์ is not ๐ฝ or ๐ฝ",
|
|
"expected": ":alien: is not :alien: and ์ is not :alien: or :alien:"
|
|
},
|
|
{
|
|
"description": "multiline emoji string",
|
|
"text": "๐\\n๐",
|
|
"expected": ":dancer:\\n:dancer:"
|
|
},
|
|
{
|
|
"description": "alias vs. canonical",
|
|
"text": "๐ฏ๐ต ใฉใใใใใใจใ",
|
|
"expected": ":flag_jp: ใฉใใใใใใจใ"
|
|
},
|
|
{
|
|
"description": "unicode character conversion within excluded tag",
|
|
"text": "<div>๐</div>",
|
|
"expected": "<div>:smile:</div>"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"module": "toImage",
|
|
"tests": [
|
|
{
|
|
"description": "single character shortname conversion",
|
|
"text": "Hello world! ๐ :smile:",
|
|
"expected": "Hello world! <img class=\"joypixels\" alt=\"๐\" title=\":smile:\" src=\"https://cdn.jsdelivr.net/joypixels/assets/{{version}}/png/unicode/32/1f604.png\"/> <img class=\"joypixels\" alt=\"๐\" title=\":smile:\" src=\"https://cdn.jsdelivr.net/joypixels/assets/{{version}}/png/unicode/32/1f604.png\"/>"
|
|
},
|
|
{
|
|
"description": "shortname shares a colon",
|
|
"text": ":invalid:snail:",
|
|
"expected": ":invalid<img class=\"joypixels\" alt=\"๐\" title=\":snail:\" src=\"https://cdn.jsdelivr.net/joypixels/assets/{{version}}/png/unicode/32/1f40c.png\"/>"
|
|
},
|
|
{
|
|
"description": "single unicode character conversion",
|
|
"text": "๐",
|
|
"expected": "<img class=\"joypixels\" alt=\"๐\" title=\":snail:\" src=\"https://cdn.jsdelivr.net/joypixels/assets/{{version}}/png/unicode/32/1f40c.png\"/>"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|