1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
kazu 2012-07-22 16:55:55 +00:00
parent 89a030795a
commit 216b833003
2 changed files with 13 additions and 0 deletions

View file

@ -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> 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 * test/uri/test_generic.rb (URI#with_env): unset proxy related env

View file

@ -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_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) 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 end
def test_find_proxy_case_sensitive_env def test_find_proxy_case_sensitive_env