mcchunkie/plugins/highfive_test.go
2020-03-13 15:05:08 -06:00

21 lines
403 B
Go

package plugins
import (
"testing"
)
func TestHighFiveMatch(t *testing.T) {
testStrings := make(map[string]bool)
testStrings["o/"] = true
testStrings[`\o`] = true
testStrings["_o"] = false
testStrings["o_"] = false
h := &HighFive{}
for msg, should := range testStrings {
if h.Match("", msg) != should {
t.Errorf("HighFive expected to match %q (%t); but doesn't\n", msg, should)
}
}
}