Files

24 lines
483 B
Go

package naive
import "testing"
func TestNormalizeProxyURI(t *testing.T) {
in := "naive+https://user:pass@de50.example.com:443#site_u1_s454"
got, err := NormalizeProxyURI(in)
if err != nil {
t.Fatal(err)
}
want := "https://user:pass@de50.example.com:443"
if got != want {
t.Fatalf("got %q want %q", got, want)
}
got, err = NormalizeProxyURI("quic://user:pass@host")
if err != nil {
t.Fatal(err)
}
if got != "quic://user:pass@host" {
t.Fatalf("got %q", got)
}
}