zulip/zerver/tests/fixtures/slack_message_conversion.json

90 lines
2.9 KiB
JSON

{
"regular_tests": [
{
"name": "slack_link1",
"input": ">Google logo today:\n><https://www.google.com/images/srpr/logo4w.png>\n>Kinda boring",
"conversion_output": ">Google logo today:\n>https://www.google.com/images/srpr/logo4w.png\n>Kinda boring"
},
{
"name": "slack_link_with_pipe",
"input": ">Google logo today:\n><https://foo.com|foo>\n>Kinda boring",
"conversion_output": ">Google logo today:\n>[foo](https://foo.com)\n>Kinda boring"
},
{
"name": "slack_link_with_pipes",
"input": ">Google logo today:\n><https://foo.com|foo|oof>\n>Kinda boring",
"conversion_output": ">Google logo today:\n>[foo|oof](https://foo.com)\n>Kinda boring"
},
{
"name": "slack_link2",
"input": "<http://datausa.io/> this is a good website.",
"conversion_output": "http://datausa.io/ this is a good website."
},
{
"name": "mailto_format1",
"input": "email me at <mailto:random@gmail.com|random@gmail.com>",
"conversion_output": "email me at mailto:random@gmail.com"
},
{
"name": "mailto_format2",
"input": "email me at <mailto:random@gmail.com>",
"conversion_output": "email me at mailto:random@gmail.com"
},
{
"name": "valid_strikethrough_test",
"input": "(~str ike!~, text. ~Also ~)",
"conversion_output": "(~~str ike!~~, text. ~~Also ~~)"
},
{
"name": "invalid_strikethrough_test",
"input": "Mid~word~ strike. Also ~~strike~~)",
"conversion_output": "Mid~word~ strike. Also ~~strike~~)"
},
{
"name": "valid_italic_test",
"input": "ital ^_lic_, _wo r@d_.",
"conversion_output": "ital ^*lic*, *wo r@d*."
},
{
"name": "invalid_italic_test",
"input": "mid_word_, @_italics_",
"conversion_output": "mid_word_, @_italics_"
},
{
"name": "valid_bold_test",
"input": "(*text*} and normal :* bold*.",
"conversion_output": "(**text**} and normal :** bold**."
},
{
"name": "invalid_bold_test",
"input": "*mid*word **word**",
"conversion_output": "*mid*word **word**"
},
{
"name": "no_conversion",
"input": "***word***",
"conversion_output": "***word***"
},
{
"name": "valid_bold_and_italic_conversion_1",
"input": "*_test bold and italic message_*",
"conversion_output": "***test bold and italic message***"
},
{
"name": "valid_bold_and_italic_conversion_2",
"input": "_*test bold and italic message*_",
"conversion_output": "***test bold and italic message***"
},
{
"name": "bold_and_strike_conversion",
"input": "~*bold*~ and *~strike~*.",
"conversion_output": "~~**bold**~~ and **~~strike~~**."
},
{
"name": "italic_and_strike_conversion",
"input": "_~italic~_ and ~_strike_~",
"conversion_output": "*~~italic~~* and ~~*strike*~~"
}
]
}