[前][次][番号順一覧][スレッド一覧]

ruby-changes:19250

From: knu <ko1@a...>
Date: Fri, 15 Apr 2011 17:04:33 +0900 (JST)
Subject: [ruby-changes:19250] Ruby:r31289 (trunk): Add some more tests for the previous fix.

knu	2011-04-15 15:21:56 +0900 (Fri, 15 Apr 2011)

  New Revision: 31289

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=31289

  Log:
    Add some more tests for the previous fix.

  Modified files:
    trunk/test/uri/test_generic.rb

Index: test/uri/test_generic.rb
===================================================================
--- test/uri/test_generic.rb	(revision 31288)
+++ test/uri/test_generic.rb	(revision 31289)
@@ -222,15 +222,21 @@
     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')

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]