mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/uri/generic.rb (split_userinfo): should split ":pass" into ""
and "pass". [ruby-dev:25667] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@8020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d805a0d076
commit
616a75e7e3
3 changed files with 22 additions and 9 deletions
|
@ -117,11 +117,26 @@ class TestGeneric < Test::Unit::TestCase
|
|||
assert_raises(URI::InvalidURIError) { URI.parse('http://a_b/') }
|
||||
|
||||
# 8
|
||||
# reporte by m_seki
|
||||
# reported by m_seki
|
||||
uri = URI.parse('file:///foo/bar.txt')
|
||||
assert_kind_of(URI::Generic, url)
|
||||
uri = URI.parse('file:/foo/bar.txt')
|
||||
assert_kind_of(URI::Generic, url)
|
||||
|
||||
# 9
|
||||
# [ruby-dev:25667]
|
||||
url = URI.parse('ftp://:pass@localhost/')
|
||||
assert_equal('', url.user)
|
||||
assert_equal('pass', url.password)
|
||||
assert_equal(':pass', url.userinfo)
|
||||
url = URI.parse('ftp://user@localhost/')
|
||||
assert_equal('user', url.user)
|
||||
assert_equal(nil, url.password)
|
||||
assert_equal('user', url.userinfo)
|
||||
url = URI.parse('ftp://localhost/')
|
||||
assert_equal(nil, url.user)
|
||||
assert_equal(nil, url.password)
|
||||
assert_equal(nil, url.userinfo)
|
||||
end
|
||||
|
||||
def test_merge
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue