Files
eiblog/check_test.go
deepzz0 ddf508825c init
2016-09-29 02:59:27 +08:00

30 lines
474 B
Go

package main
import (
"testing"
)
func TestCheckEmail(t *testing.T) {
e := "xx@email.com"
e1 := "xxxxemail.com"
e2 := "xxx#email.com"
t.Log(CheckEmail(e))
t.Log(CheckEmail(e1))
t.Log(CheckEmail(e2))
}
func TestCheckDomain(t *testing.T) {
d := "123.com"
d1 := "http://123.com"
d2 := "https://123.com"
d3 := "123#.com"
d4 := "123.coooom"
t.Log(CheckDomain(d))
t.Log(CheckDomain(d1))
t.Log(CheckDomain(d1))
t.Log(CheckDomain(d1))
t.Log(CheckDomain(d4))
}