diff options
Diffstat (limited to 'libgo/go/net/http/proxy_test.go')
-rw-r--r-- | libgo/go/net/http/proxy_test.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libgo/go/net/http/proxy_test.go b/libgo/go/net/http/proxy_test.go index 823d1447ee9..f59a551f0ac 100644 --- a/libgo/go/net/http/proxy_test.go +++ b/libgo/go/net/http/proxy_test.go @@ -75,7 +75,13 @@ func TestCacheKeys(t *testing.T) { func ResetProxyEnv() { for _, v := range []string{"HTTP_PROXY", "http_proxy", "NO_PROXY", "no_proxy"} { - os.Setenv(v, "") + os.Unsetenv(v) } ResetCachedEnvironment() } + +func TestInvalidNoProxy(t *testing.T) { + ResetProxyEnv() + os.Setenv("NO_PROXY", ":1") + useProxy("example.com:80") // should not panic +} |