mirror of
https://github.com/shadow1ng/fscan.git
synced 2026-09-22 03:10:42 +08:00
11 lines
262 B
Go
11 lines
262 B
Go
package common
|
|
|
|
import "testing"
|
|
|
|
func TestHostInfoTargetUsesBracketedIPv6(t *testing.T) {
|
|
info := &HostInfo{Host: "2001:db8::1", Port: 443}
|
|
if got, want := info.Target(), "[2001:db8::1]:443"; got != want {
|
|
t.Fatalf("Target() = %q, want %q", got, want)
|
|
}
|
|
}
|