aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-22 16:55:55 +0000
committerkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-07-22 16:55:55 +0000
commit216b833003d60bb478d3e7292cafea5b36fd2174 (patch)
tree0f53e1c3f356643e540b0fa24a31cfde2a1800db
parent89a030795a0ddadfdaabcd2f7a66b87eb92b8265 (diff)
downloadruby-216b833003d60bb478d3e7292cafea5b36fd2174.tar.gz
* test/uri/test_generic.rb (URI#test_find_proxy): add tests with empty *_proxy env variables.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--test/uri/test_generic.rb8
2 files changed, 13 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 826bebf9c4..e72ada3778 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Jul 23 01:55:08 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
+
+ * test/uri/test_generic.rb (URI#test_find_proxy): add tests with
+ empty *_proxy env variables.
+
Mon Jul 23 01:47:26 2012 Kazuhiro NISHIYAMA <zn@mbf.nifty.com>
* test/uri/test_generic.rb (URI#with_env): unset proxy related env
diff --git a/test/uri/test_generic.rb b/test/uri/test_generic.rb
index 9c0b6051a7..2d4603ca44 100644
--- a/test/uri/test_generic.rb
+++ b/test/uri/test_generic.rb
@@ -758,6 +758,14 @@ class URI::TestGeneric < Test::Unit::TestCase
assert_equal(URI('http://127.0.0.1:8080'), URI("http://192.0.2.1/").find_proxy)
assert_nil(URI("http://192.0.2.2/").find_proxy)
}
+ with_env('http_proxy'=>'') {
+ assert_equal(URI(''), URI("http://192.0.2.1/").find_proxy)
+ assert_nil(URI("ftp://192.0.2.1/").find_proxy)
+ }
+ with_env('ftp_proxy'=>'') {
+ assert_nil(URI("http://192.0.2.1/").find_proxy)
+ assert_equal(URI(''), URI("ftp://192.0.2.1/").find_proxy)
+ }
end
def test_find_proxy_case_sensitive_env