diff options
| author | akira <akira@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-02-23 06:08:29 +0000 |
|---|---|---|
| committer | akira <akira@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-02-23 06:08:29 +0000 |
| commit | f4436d968069dd10e5773d6747d79e160f1b3d19 (patch) | |
| tree | 8d47afc558ca6b160bba83fbe5a74077e5a9e71e /test | |
| parent | bbe22a773d6c0fa26e31a3bb47cff733c7427575 (diff) | |
| download | ruby-f4436d968069dd10e5773d6747d79e160f1b3d19.tar.gz ruby-f4436d968069dd10e5773d6747d79e160f1b3d19.tar.xz ruby-f4436d968069dd10e5773d6747d79e160f1b3d19.zip | |
* lib/uri/generic.rb (split_userinfo): should split ":pass" into ""
and "pass". [ruby-dev:25667]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@8020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
| -rw-r--r-- | test/uri/test_generic.rb | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/test/uri/test_generic.rb b/test/uri/test_generic.rb index 8740574e4..8a7feb498 100644 --- a/test/uri/test_generic.rb +++ b/test/uri/test_generic.rb @@ -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 |
