adding vendor folder

This commit is contained in:
evilsocket 2018-03-23 15:25:11 +01:00
commit c304ca4696
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
1145 changed files with 369961 additions and 2 deletions

34
vendor/github.com/jpillora/go-tld/parse_test.go generated vendored Normal file
View file

@ -0,0 +1,34 @@
package tld
import "testing"
func run(input, sub, dom, tld string, t *testing.T) {
u, err := Parse(input)
if err != nil {
t.Errorf("errored '%s'", err)
} else if u.TLD != tld {
t.Errorf("should have TLD '%s', got '%s'", tld, u.TLD)
} else if u.Domain != dom {
t.Errorf("should have Domain '%s', got '%s'", dom, u.Domain)
} else if u.Subdomain != sub {
t.Errorf("should have Subdomain '%s', got '%s'", sub, u.Subdomain)
}
}
func Test0(t *testing.T) {
run("http://foo.com", "", "foo", "com", t)
}
func Test1(t *testing.T) {
run("http://zip.zop.foo.com", "zip.zop", "foo", "com", t)
}
func Test2(t *testing.T) {
run("http://au.com.au", "", "au", "com.au", t)
}
func Test3(t *testing.T) {
run("http://im.from.england.co.uk:1900", "im.from", "england", "co.uk", t)
}