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:
parent
835693dac5
commit
733d4294fc
1 changed files with 9 additions and 3 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Reference in a new issue