1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-12-11 07:54:58 +00:00
arikawa/bot/extras/arguments/emoji_test.go

29 lines
483 B
Go
Raw Normal View History

2020-01-25 02:49:33 +00:00
package arguments
import "testing"
func TestEmojiRune(t *testing.T) {
var emojis = []string{
"🏑",
"❄️",
"🤲🏿",
}
var notEmojis = []string{
"🏃🏿🏃🏿", // dual emojis
"te", // not emoji
}
for i, emoji := range emojis {
if !stringIsEmojiOnly(emoji) {
t.Fatal(i, "is an emoji, function returned false")
}
}
for i, not := range notEmojis {
if stringIsEmojiOnly(not) {
t.Fatal(i, "is not an emoji, function returned true")
}
}
}