1
0
mirror of https://github.com/zu1k/nali.git synced 2025-01-22 21:29:02 +08:00
nali/internal/re/re_test.go
2021-07-30 22:30:27 +08:00

24 lines
387 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package re
import (
"fmt"
"testing"
)
var domainList = []string{
"a.a.qiniudns.com",
"a.com.qiniudns.com",
"a.com.cn.qiniudns.com",
"看这里a.com.cn.qiniudns.com行不行",
}
func TestDomainRe(t *testing.T) {
for _, domain := range domainList {
if !DomainRe.MatchString(domain) {
t.Error(domain)
t.Fail()
}
fmt.Println(DomainRe.FindAllString(domain, -1))
}
}