diff options
author | BjΓΈrn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-05-09 22:59:49 +0200 |
---|---|---|
committer | BjΓΈrn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2016-05-09 22:59:49 +0200 |
commit | 26906d856916a27456f699dd2494bd796c025837 (patch) | |
tree | 82aec3f8aa258ca32fa9257ee7c9bb9f53b9b830 /helpers/emoji_test.go | |
parent | 608cfe62cfcc2de8cf952e88b75436d064a6af7f (diff) |
Don't add any space around Emojis
Diffstat (limited to 'helpers/emoji_test.go')
-rw-r--r-- | helpers/emoji_test.go | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/helpers/emoji_test.go b/helpers/emoji_test.go index 65cb98989..98005511d 100644 --- a/helpers/emoji_test.go +++ b/helpers/emoji_test.go @@ -13,11 +13,12 @@ package helpers import ( - "github.com/kyokomi/emoji" - "github.com/spf13/hugo/bufferpool" "reflect" "strings" "testing" + + "github.com/kyokomi/emoji" + "github.com/spf13/hugo/bufferpool" ) func TestEmojiCustom(t *testing.T) { @@ -25,24 +26,24 @@ func TestEmojiCustom(t *testing.T) { input string expect []byte }{ - {"A :smile: a day", []byte(emoji.Sprint("A :smile: a day"))}, - {"A few :smile:s a day", []byte(emoji.Sprint("A few :smile:s a day"))}, - {"A :smile: and a :beer: makes the day for sure.", []byte(emoji.Sprint("A :smile: and a :beer: makes the day for sure."))}, - {"A :smile: and: a :beer:", []byte(emoji.Sprint("A :smile: and: a :beer:"))}, - {"A :diamond_shape_with_a_dot_inside: and then some.", []byte(emoji.Sprint("A :diamond_shape_with_a_dot_inside: and then some."))}, - {":smile:", []byte(emoji.Sprint(":smile:"))}, + {"A :smile: a day", []byte("A π a day")}, + {"A few :smile:s a day", []byte("A few πs a day")}, + {"A :smile: and a :beer: makes the day for sure.", []byte("A π and a πΊ makes the day for sure.")}, + {"A :smile: and: a :beer:", []byte("A π and: a πΊ")}, + {"A :diamond_shape_with_a_dot_inside: and then some.", []byte("A π and then some.")}, + {":smile:", []byte("π")}, {":smi", []byte(":smi")}, - {"A :smile:", []byte(emoji.Sprint("A :smile:"))}, - {":beer:!", []byte(emoji.Sprint(":beer:!"))}, - {"::smile:", []byte(emoji.Sprint("::smile:"))}, - {":beer::", []byte(emoji.Sprint(":beer::"))}, - {" :beer: :", []byte(emoji.Sprint(" :beer: :"))}, - {":beer: and :smile: and another :beer:!", []byte(emoji.Sprint(":beer: and :smile: and another :beer:!"))}, - {" :beer: : ", []byte(emoji.Sprint(" :beer: : "))}, + {"A :smile:", []byte("A π")}, + {":beer:!", []byte("πΊ!")}, + {"::smile:", []byte(":π")}, + {":beer::", []byte("πΊ:")}, + {" :beer: :", []byte(" πΊ :")}, + {":beer: and :smile: and another :beer:!", []byte("πΊ and π and another πΊ!")}, + {" :beer: : ", []byte(" πΊ : ")}, {"No smilies for you!", []byte("No smilies for you!")}, {" The motto: no smiles! ", []byte(" The motto: no smiles! ")}, {":hugo_is_the_best_static_gen:", []byte(":hugo_is_the_best_static_gen:")}, - {"μν :smile: μν", []byte(emoji.Sprint("μν :smile: μν"))}, + {"μν :smile: μν", []byte("μν π μν")}, } { result := Emojify([]byte(this.input)) |