mirror of
https://github.com/bettercap/bettercap
synced 2025-08-13 02:06:57 -07:00
adding vendor folder
This commit is contained in:
parent
49c65021ea
commit
c304ca4696
1145 changed files with 369961 additions and 2 deletions
34
vendor/github.com/jpillora/go-tld/parse_test.go
generated
vendored
Normal file
34
vendor/github.com/jpillora/go-tld/parse_test.go
generated
vendored
Normal 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)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue