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

Add some more tests for the previous fix.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
knu 2011-04-15 06:21:56 +00:00
parent 835693dac5
commit 733d4294fc

View file

@ -222,15 +222,21 @@ class URI::TestGeneric < Test::Unit::TestCase
url = URI.parse('http://hoge/a/b/').route_to('http://hoge/b/')
assert_equal('../../b/', url.to_s)
url = URI.parse('http://hoge/a/b/').route_to('http://hoge/a/b')
assert_equal('../b', url.to_s)
url = URI.parse('http://hoge/a/b/').route_to('http://HOGE/b/')
assert_equal('../../b/', url.to_s)
url = URI.parse('http://hoge/a/b/').route_to('http://MOGE/b/')
assert_equal('//MOGE/b/', url.to_s)
url = URI.parse('http://hoge/b').route_to('http://hoge/b/')
assert_equal('b/', url.to_s)
url = URI.parse('http://hoge/b/a').route_to('http://hoge/b/')
assert_equal('./', url.to_s)
url = URI.parse('http://hoge/b/').route_to('http://hoge/b')
assert_equal('../b', url.to_s)
url = URI.parse('http://hoge/b').route_to('http://hoge/b:c')
assert_equal('./b:c', url.to_s)
url = URI.parse('file:///a/b/').route_to('file:///a/b/')
assert_equal('', url.to_s)
url = URI.parse('file:///a/b/').route_to('file:///a/b')