diff options
Diffstat (limited to 'modules/markup/html_test.go')
-rw-r--r-- | modules/markup/html_test.go | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/modules/markup/html_test.go b/modules/markup/html_test.go index 8c3d2b5395..85418892ef 100644 --- a/modules/markup/html_test.go +++ b/modules/markup/html_test.go @@ -284,7 +284,18 @@ func TestRender_emoji(t *testing.T) { test( ":gitea:", `<p><span class="emoji" aria-label="gitea"><img alt=":gitea:" src="`+setting.StaticURLPrefix+`/assets/img/emoji/gitea.png"/></span></p>`) - + test( + ":custom-emoji:", + `<p>:custom-emoji:</p>`) + setting.UI.CustomEmojisMap["custom-emoji"] = ":custom-emoji:" + test( + ":custom-emoji:", + `<p><span class="emoji" aria-label="custom-emoji"><img alt=":custom-emoji:" src="`+setting.StaticURLPrefix+`/assets/img/emoji/custom-emoji.png"/></span></p>`) + test( + "θΏζ―ε符:1::+1: someπ \U0001f44d:custom-emoji: :gitea:", + `<p>θΏζ―ε符:1:<span class="emoji" aria-label="thumbs up">π</span> some<span class="emoji" aria-label="crocodile">π</span> `+ + `<span class="emoji" aria-label="thumbs up">π</span><span class="emoji" aria-label="custom-emoji"><img alt=":custom-emoji:" src="`+setting.StaticURLPrefix+`/assets/img/emoji/custom-emoji.png"/></span> `+ + `<span class="emoji" aria-label="gitea"><img alt=":gitea:" src="`+setting.StaticURLPrefix+`/assets/img/emoji/gitea.png"/></span></p>`) test( "Some text with π in the middle", `<p>Some text with <span class="emoji" aria-label="grinning face with smiling eyes">π</span> in the middle</p>`) |