mirror of
https://github.com/diamondburned/arikawa.git
synced 2024-11-18 04:42:54 +00:00
29 lines
483 B
Go
29 lines
483 B
Go
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")
|
|
}
|
|
}
|
|
}
|