diff --git a/frontend_tests/node_tests/markdown.js b/frontend_tests/node_tests/markdown.js index 196118313d..775b074d67 100644 --- a/frontend_tests/node_tests/markdown.js +++ b/frontend_tests/node_tests/markdown.js @@ -297,9 +297,9 @@ run_test('marked', () => { {input: 'mmm...:burrito:s', expected: '
mmm...s
'}, {input: 'This is an :poop: message', - expected: 'This is an :poop: message
'}, + expected: 'This is an :poop: message
'}, {input: "\ud83d\udca9", - expected: ':poop:
'}, + expected: ':poop:
'}, {input: '\u{1f6b2}', expected: '\u{1f6b2}
' }, // Test only those realm filters which don't return True for @@ -349,7 +349,7 @@ run_test('marked', () => { {input: ':)', expected: ':)
'}, {input: ':)', - expected: ':slight_smile:
', + expected: ':slight_smile:
', translate_emoticons: true}, // Test HTML Escape in Custom Zulip Rules {input: '@**test :smile: again :poop:
\n:) foo:)bar x::y::z :wasted waste: :fakeemojithisshouldnotrender:
test :smile: again :poop:
\n:) foo:)bar x::y::z :wasted waste: :fakeemojithisshouldnotrender:
:slight_smile:
", + "expected_output": ":slight_smile:
", "text_content": "\ud83d\ude42", "translate_emoticons": true }, { "name": "translate_emoticons", "input": ":) foo :( bar <3 with space : ) real emoji :slight_smile:", - "expected_output": ":slight_smile: foo :frown: bar :heart: with space : ) real emoji :slight_smile:
", + "expected_output": ":slight_smile: foo :frown: bar :heart: with space : ) real emoji :slight_smile:
", "text_content": "\ud83d\ude42 foo \ud83d\ude41 bar \u2764 with space : ) real emoji \ud83d\ude42", "translate_emoticons": true }, @@ -381,7 +381,7 @@ { "name": "translate_emoticons_newline", "input": ":) test\n:) test", - "expected_output": ":slight_smile: test
\n:slight_smile: test
:slight_smile: test
\n:slight_smile: test
Translate this :slight_smile:.
", + "expected_output": "Translate this :slight_smile:.
", "text_content": "Translate this \ud83d\ude42.", "translate_emoticons": true }, { "name": "translate_emoticons_between_symbols", "input": "Translate this !:)?", - "expected_output": "Translate this !:slight_smile:?
", + "expected_output": "Translate this !:slight_smile:?
", "marked_expected_output": "Translate this !:)?
", "text_content": "Translate this !\ud83d\ude42?", "translate_emoticons": true @@ -410,7 +410,7 @@ { "name": "random_emoji_1", "input": ":airplane:", - "expected_output": ":airplane:
" + "expected_output": ":airplane:
" }, { "name": "zulip_emoji", @@ -421,18 +421,18 @@ { "name": "random_emoji_2", "input": ":poop:", - "expected_output": ":poop:
" + "expected_output": ":poop:
" }, { "name": "emojis_without_space", "input": ":cat:hello:dog::rabbit:", - "expected_output": ":cat:hello:dog::rabbit:
", + "expected_output": ":cat:hello:dog::rabbit:
", "text_content": "\ud83d\udc08hello\ud83d\udc15\ud83d\udc07" }, { "name": "emojis_newline", "input": ":cat:\n:dog:", - "expected_output": ":cat:
\n:dog:
:cat:
\n:dog:
:poop:
", + "expected_output":":poop:
", "text_content": "\ud83d\udca9" }, { "name": "two_unicode_emoji", "input": "\ud83d\udca9\ud83d\udca9", - "expected_output":":poop::poop:<\/p>", + "expected_output":"
:poop::poop:<\/p>", "text_content": "\ud83d\udca9\ud83d\udca9" }, { "name": "two_unicode_emoji_separated_by_text", "input": "\ud83d\udca9 word \ud83d\udca9", - "expected_output":"
:poop: word :poop:<\/p>", + "expected_output":"
:poop: word :poop:<\/p>", "text_content": "\ud83d\udca9 word \ud83d\udca9" }, { "name": "miscellaneous_symbols_and_pictographs", "input": "Merry Christmas!!\ud83c\udf84", - "expected_output":"
Merry Christmas!!:holiday_tree:<\/p>", + "expected_output":"
Merry Christmas!!:holiday_tree:<\/p>", "text_content": "Merry Christmas!!\ud83c\udf84" }, { "name": "miscellaneous_and_dingbats_emoji", "input": "\u2693\u2797", - "expected_output":"
:anchor::division:<\/p>" + "expected_output":"
:anchor::division:<\/p>" }, { "name": "supplemental_symbols_and_pictographs", "input": "I am a robot \ud83e\udd16.", - "expected_output":"
I am a robot :robot:.<\/p>" + "expected_output":"
I am a robot :robot:.<\/p>" }, { "name": "miscellaneous_symbols_and_arrows", "input": "Black upward arrow \u2b06", - "expected_output":"
Black upward arrow :up:<\/p>" + "expected_output":"
Black upward arrow :up:<\/p>" }, { "name": "unicode_emoji_without_space", "input": "Extra\ud83d\udc7dTerrestrial", - "expected_output":"
Extra:alien:Terrestrial<\/p>" + "expected_output":"
Extra:alien:Terrestrial<\/p>" }, { "name": "unicode_emojis_new_line", "input": "\ud83d\udc7d\n\ud83d\udc7d", - "expected_output":"
:alien:
\n:alien:
:alien:
\n:alien:
:smile:, :smile:; :smile:
" + "expected_output": ":smile:, :smile:; :smile:
" }, { "name": "new_emoji_test", "input": ":avocado:, :kiwi:, :selfie:, :gear:, :comet:, :gold:", - "expected_output": ":avocado:, :kiwi:, :selfie:, :gear:, :comet:, :gold:
" + "expected_output": ":avocado:, :kiwi:, :selfie:, :gear:, :comet:, :gold:
" }, { "name": "emoji_pipeline_newline", "input": "The winner is:\nsmiley:smiley:", - "expected_output": "The winner is:
\nsmiley:smiley:
The winner is:
\nsmiley:smiley:
Visit https:smiley://google.com.
" + "expected_output": "Visit https:smiley://google.com.
" }, { "name": "skin_tones_are_banned", diff --git a/zerver/tests/test_bugdown.py b/zerver/tests/test_bugdown.py index 39e618bb71..9ea0f76a20 100644 --- a/zerver/tests/test_bugdown.py +++ b/zerver/tests/test_bugdown.py @@ -551,7 +551,7 @@ class BugdownTest(ZulipTestCase): media_tweet_html = ('' 'http://twitter.com/NEVNBoston/status/421654515616849920/photo/1') - emoji_in_tweet_html = """Zulip is :100:% open-source!""" + emoji_in_tweet_html = """Zulip is :100:% open-source!""" def make_inline_twitter_preview(url: str, tweet_html: str, image_html: str='') -> str: ## As of right now, all previews are mocked to be the exact same tweet @@ -698,11 +698,11 @@ class BugdownTest(ZulipTestCase): def test_unicode_emoji(self) -> None: msg = u'\u2615' # ☕ converted = bugdown_convert(msg) - self.assertEqual(converted, u':coffee:
') + self.assertEqual(converted, u':coffee:
') msg = u'\u2615\u2615' # ☕☕ converted = bugdown_convert(msg) - self.assertEqual(converted, u':coffee::coffee:
') + self.assertEqual(converted, u':coffee::coffee:
') def test_no_translate_emoticons_if_off(self) -> None: user_profile = self.example_user('othello') diff --git a/zerver/tests/test_notifications.py b/zerver/tests/test_notifications.py index d2206f6149..6c92d3ef87 100644 --- a/zerver/tests/test_notifications.py +++ b/zerver/tests/test_notifications.py @@ -856,7 +856,7 @@ class TestMissedMessages(ZulipTestCase): def test_fix_emoji(self) -> None: # An emoji. - test_data = 'See ' + \
+ test_data = ' See ' + \
':cloud_with_lightning_and_rain:. See