test for plugins

This commit is contained in:
Aaron Bieber 2020-01-31 19:57:58 -07:00
parent 97956445da
commit bf3e56ed99

18
plugins/plugins_test.go Normal file
View File

@ -0,0 +1,18 @@
package plugins
import (
"testing"
)
func TestPluginsToMe(t *testing.T) {
if ToMe("a", "a") == false {
t.Error("ToMe expected true; got false\n")
}
}
func TestPluginsNameRE(t *testing.T) {
n := NameRE.ReplaceAllString("@test:test.com", "$1")
if n != "test" {
t.Errorf("NameRE expected 'test'; got %q\n", n)
}
}