summaryrefslogtreecommitdiff
path: root/test/uri
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-06 03:56:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-06 03:56:38 +0000
commit287a34ae0dfc23e4158f67cb7783d239f202c368 (patch)
tree5e35d5b41aae961b37cf6632f60c42f51c7aa775 /test/uri
parent9b52ae2e6491bb5d6c59e1799449f6268baf6f89 (diff)
* {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/uri')
-rw-r--r--test/uri/test_common.rb14
-rw-r--r--test/uri/test_ftp.rb8
-rw-r--r--test/uri/test_generic.rb32
-rw-r--r--test/uri/test_http.rb2
-rw-r--r--test/uri/test_ldap.rb24
-rw-r--r--test/uri/test_mailto.rb22
6 files changed, 51 insertions, 51 deletions
diff --git a/test/uri/test_common.rb b/test/uri/test_common.rb
index 0fe031bdee..dfc4acd8d3 100644
--- a/test/uri/test_common.rb
+++ b/test/uri/test_common.rb
@@ -12,20 +12,20 @@ class TestCommon < Test::Unit::TestCase
end
def test_extract
- assert_equal(['http://example.com'],
+ assert_equal(['http://example.com'],
URI.extract('http://example.com'))
- assert_equal(['http://example.com'],
+ assert_equal(['http://example.com'],
URI.extract('(http://example.com)'))
- assert_equal(['http://example.com/foo)'],
+ assert_equal(['http://example.com/foo)'],
URI.extract('(http://example.com/foo)'))
- assert_equal(['http://example.jphttp://example.jp'],
+ assert_equal(['http://example.jphttp://example.jp'],
URI.extract('http://example.jphttp://example.jp'), "[ruby-list:36086]")
- assert_equal(['http://example.jphttp://example.jp'],
+ assert_equal(['http://example.jphttp://example.jp'],
URI.extract('http://example.jphttp://example.jp', ['http']), "[ruby-list:36086]")
- assert_equal(['http://', 'mailto:'].sort,
+ assert_equal(['http://', 'mailto:'].sort,
URI.extract('ftp:// http:// mailto: https://', ['http', 'mailto']).sort)
# reported by Doug Kearns <djkea2@mugca.its.monash.edu.au>
- assert_equal(['From:', 'mailto:xxx@xxx.xxx.xxx]'].sort,
+ assert_equal(['From:', 'mailto:xxx@xxx.xxx.xxx]'].sort,
URI.extract('From: XXX [mailto:xxx@xxx.xxx.xxx]').sort)
end
diff --git a/test/uri/test_ftp.rb b/test/uri/test_ftp.rb
index 6311be81b7..0d76c4497b 100644
--- a/test/uri/test_ftp.rb
+++ b/test/uri/test_ftp.rb
@@ -14,7 +14,7 @@ class TestFTP < Test::Unit::TestCase
exp = [
'ftp',
- 'user:pass', 'host.com', URI::FTP.default_port,
+ 'user:pass', 'host.com', URI::FTP.default_port,
'abc/def', nil,
]
ary = [
@@ -28,7 +28,7 @@ class TestFTP < Test::Unit::TestCase
end
def test_paths
- # If you think what's below is wrong, please read RubyForge bug 2055,
+ # If you think what's below is wrong, please read RubyForge bug 2055,
# RFC 1738 section 3.2.2, and RFC 2396.
u = URI.parse('ftp://ftp.example.com/foo/bar/file.ext')
assert(u.path == 'foo/bar/file.ext')
@@ -41,9 +41,9 @@ class TestFTP < Test::Unit::TestCase
def test_assemble
# uri/ftp is conservative and uses the older RFC 1738 rules, rather than
# assuming everyone else has implemented RFC 2396.
- uri = URI::FTP.build(['user:password', 'ftp.example.com', nil,
+ uri = URI::FTP.build(['user:password', 'ftp.example.com', nil,
'/path/file.zip', 'i'])
- assert(uri.to_s ==
+ assert(uri.to_s ==
'ftp://user:password@ftp.example.com/%2Fpath/file.zip;type=i')
end
diff --git a/test/uri/test_generic.rb b/test/uri/test_generic.rb
index 0d481c369a..fcaa599724 100644
--- a/test/uri/test_generic.rb
+++ b/test/uri/test_generic.rb
@@ -19,9 +19,9 @@ class URI::TestGeneric < Test::Unit::TestCase
assert_kind_of(URI::HTTP, @base_url)
exp = [
- 'http',
- nil, 'a', URI::HTTP.default_port,
- '/b/c/d;p',
+ 'http',
+ nil, 'a', URI::HTTP.default_port,
+ '/b/c/d;p',
'q',
nil
]
@@ -33,8 +33,8 @@ class URI::TestGeneric < Test::Unit::TestCase
assert_kind_of(URI::FTP, url)
exp = [
- 'ftp',
- nil, 'ftp.is.co.za', URI::FTP.default_port,
+ 'ftp',
+ nil, 'ftp.is.co.za', URI::FTP.default_port,
'rfc/rfc1808.txt', nil,
]
ary = uri_to_ary(url)
@@ -44,8 +44,8 @@ class URI::TestGeneric < Test::Unit::TestCase
assert_kind_of(URI::FTP, url)
exp = [
- 'ftp',
- nil, 'ftp.is.co.za', URI::FTP.default_port,
+ 'ftp',
+ nil, 'ftp.is.co.za', URI::FTP.default_port,
'/rfc/rfc1808.txt', nil,
]
ary = uri_to_ary(url)
@@ -56,7 +56,7 @@ class URI::TestGeneric < Test::Unit::TestCase
assert_kind_of(URI::Generic, url)
exp = [
- 'gopher',
+ 'gopher',
nil, 'spinaltap.micro.umn.edu', nil, nil,
'/00/Weather/California/Los%20Angeles', nil,
nil,
@@ -70,9 +70,9 @@ class URI::TestGeneric < Test::Unit::TestCase
assert_kind_of(URI::HTTP, url)
exp = [
- 'http',
- nil, 'www.math.uio.no', URI::HTTP.default_port,
- '/faq/compression-faq/part1.html',
+ 'http',
+ nil, 'www.math.uio.no', URI::HTTP.default_port,
+ '/faq/compression-faq/part1.html',
nil,
nil
]
@@ -84,7 +84,7 @@ class URI::TestGeneric < Test::Unit::TestCase
assert_kind_of(URI::Generic, url)
exp = [
- 'mailto',
+ 'mailto',
'mduerst@ifi.unizh.ch',
[]
]
@@ -96,8 +96,8 @@ class URI::TestGeneric < Test::Unit::TestCase
assert_kind_of(URI::Generic, url)
exp = [
- 'news',
- nil, nil, nil, nil,
+ 'news',
+ nil, nil, nil, nil,
nil, 'comp.infosystems.www.servers.unix',
nil,
nil
@@ -110,8 +110,8 @@ class URI::TestGeneric < Test::Unit::TestCase
assert_kind_of(URI::Generic, url)
exp = [
- 'telnet',
- nil, 'melvyl.ucop.edu', nil, nil,
+ 'telnet',
+ nil, 'melvyl.ucop.edu', nil, nil,
'/', nil,
nil,
nil
diff --git a/test/uri/test_http.rb b/test/uri/test_http.rb
index 6c8e700b77..a323d43a79 100644
--- a/test/uri/test_http.rb
+++ b/test/uri/test_http.rb
@@ -18,7 +18,7 @@ class TestHTTP < Test::Unit::TestCase
def test_parse
u = URI.parse('http://a')
assert_kind_of(URI::HTTP, u)
- assert_equal(['http',
+ assert_equal(['http',
nil, 'a', URI::HTTP.default_port,
'', nil, nil], uri_to_ary(u))
end
diff --git a/test/uri/test_ldap.rb b/test/uri/test_ldap.rb
index 0eaa113c94..14ef39242e 100644
--- a/test/uri/test_ldap.rb
+++ b/test/uri/test_ldap.rb
@@ -38,47 +38,47 @@ class TestLDAP < Test::Unit::TestCase
# from RFC2255, section 6.
urls = {
'ldap:///o=University%20of%20Michigan,c=US' =>
- ['ldap', nil, URI::LDAP::DEFAULT_PORT,
- 'o=University%20of%20Michigan,c=US',
+ ['ldap', nil, URI::LDAP::DEFAULT_PORT,
+ 'o=University%20of%20Michigan,c=US',
nil, nil, nil, nil],
'ldap://ldap.itd.umich.edu/o=University%20of%20Michigan,c=US' =>
- ['ldap', 'ldap.itd.umich.edu', URI::LDAP::DEFAULT_PORT,
- 'o=University%20of%20Michigan,c=US',
+ ['ldap', 'ldap.itd.umich.edu', URI::LDAP::DEFAULT_PORT,
+ 'o=University%20of%20Michigan,c=US',
nil, nil, nil, nil],
'ldap://ldap.itd.umich.edu/o=University%20of%20Michigan,c=US?postalAddress' =>
- ['ldap', 'ldap.itd.umich.edu', URI::LDAP::DEFAULT_PORT,
+ ['ldap', 'ldap.itd.umich.edu', URI::LDAP::DEFAULT_PORT,
'o=University%20of%20Michigan,c=US',
'postalAddress', nil, nil, nil],
'ldap://host.com:6666/o=University%20of%20Michigan,c=US??sub?(cn=Babs%20Jensen)' =>
- ['ldap', 'host.com', 6666,
+ ['ldap', 'host.com', 6666,
'o=University%20of%20Michigan,c=US',
nil, 'sub', '(cn=Babs%20Jensen)', nil],
'ldap://ldap.itd.umich.edu/c=GB?objectClass?one' =>
- ['ldap', 'ldap.itd.umich.edu', URI::LDAP::DEFAULT_PORT,
- 'c=GB',
+ ['ldap', 'ldap.itd.umich.edu', URI::LDAP::DEFAULT_PORT,
+ 'c=GB',
'objectClass', 'one', nil, nil],
'ldap://ldap.question.com/o=Question%3f,c=US?mail' =>
- ['ldap', 'ldap.question.com', URI::LDAP::DEFAULT_PORT,
+ ['ldap', 'ldap.question.com', URI::LDAP::DEFAULT_PORT,
'o=Question%3f,c=US',
'mail', nil, nil, nil],
'ldap://ldap.netscape.com/o=Babsco,c=US??(int=%5c00%5c00%5c00%5c04)' =>
- ['ldap', 'ldap.netscape.com', URI::LDAP::DEFAULT_PORT,
+ ['ldap', 'ldap.netscape.com', URI::LDAP::DEFAULT_PORT,
'o=Babsco,c=US',
nil, '(int=%5c00%5c00%5c00%5c04)', nil, nil],
'ldap:///??sub??bindname=cn=Manager%2co=Foo' =>
- ['ldap', nil, URI::LDAP::DEFAULT_PORT,
+ ['ldap', nil, URI::LDAP::DEFAULT_PORT,
'',
nil, 'sub', nil, 'bindname=cn=Manager%2co=Foo'],
'ldap:///??sub??!bindname=cn=Manager%2co=Foo' =>
- ['ldap', nil, URI::LDAP::DEFAULT_PORT,
+ ['ldap', nil, URI::LDAP::DEFAULT_PORT,
'',
nil, 'sub', nil, '!bindname=cn=Manager%2co=Foo'],
}.each do |url, ary|
diff --git a/test/uri/test_mailto.rb b/test/uri/test_mailto.rb
index 38715fcc9c..04fb6fdadc 100644
--- a/test/uri/test_mailto.rb
+++ b/test/uri/test_mailto.rb
@@ -29,46 +29,46 @@ class TestMailTo < Test::Unit::TestCase
# mailto:infobot@example.com?subject=current-issue
ok << ["mailto:infobot@example.com?subject=current-issue"]
ok[-1] << ["infobot@example.com", ["subject=current-issue"]]
- ok[-1] << {:to => "infobot@example.com",
+ ok[-1] << {:to => "infobot@example.com",
:headers => ["subject=current-issue"]}
# mailto:infobot@example.com?body=send%20current-issue
ok << ["mailto:infobot@example.com?body=send%20current-issue"]
ok[-1] << ["infobot@example.com", ["body=send%20current-issue"]]
- ok[-1] << {:to => "infobot@example.com",
+ ok[-1] << {:to => "infobot@example.com",
:headers => ["body=send%20current-issue"]}
# mailto:infobot@example.com?body=send%20current-issue%0D%0Asend%20index
ok << ["mailto:infobot@example.com?body=send%20current-issue%0D%0Asend%20index"]
- ok[-1] << ["infobot@example.com",
+ ok[-1] << ["infobot@example.com",
["body=send%20current-issue%0D%0Asend%20index"]]
- ok[-1] << {:to => "infobot@example.com",
+ ok[-1] << {:to => "infobot@example.com",
:headers => ["body=send%20current-issue%0D%0Asend%20index"]}
# mailto:foobar@example.com?In-Reply-To=%3c3469A91.D10AF4C@example.com
ok << ["mailto:foobar@example.com?In-Reply-To=%3c3469A91.D10AF4C@example.com"]
- ok[-1] << ["foobar@example.com",
+ ok[-1] << ["foobar@example.com",
["In-Reply-To=%3c3469A91.D10AF4C@example.com"]]
- ok[-1] << {:to => "foobar@example.com",
+ ok[-1] << {:to => "foobar@example.com",
:headers => ["In-Reply-To=%3c3469A91.D10AF4C@example.com"]}
# mailto:majordomo@example.com?body=subscribe%20bamboo-l
ok << ["mailto:majordomo@example.com?body=subscribe%20bamboo-l"]
ok[-1] << ["majordomo@example.com", ["body=subscribe%20bamboo-l"]]
- ok[-1] << {:to => "majordomo@example.com",
+ ok[-1] << {:to => "majordomo@example.com",
:headers => ["body=subscribe%20bamboo-l"]}
# mailto:joe@example.com?cc=bob@example.com&body=hello
ok << ["mailto:joe@example.com?cc=bob@example.com&body=hello"]
ok[-1] << ["joe@example.com", ["cc=bob@example.com", "body=hello"]]
- ok[-1] << {:to => "joe@example.com",
+ ok[-1] << {:to => "joe@example.com",
:headers => ["cc=bob@example.com", "body=hello"]}
# mailto:?to=joe@example.com&cc=bob@example.com&body=hello
ok << ["mailto:?to=joe@example.com&cc=bob@example.com&body=hello"]
- ok[-1] << [nil,
+ ok[-1] << [nil,
["to=joe@example.com", "cc=bob@example.com", "body=hello"]]
- ok[-1] << {:headers => ["to=joe@example.com",
+ ok[-1] << {:headers => ["to=joe@example.com",
"cc=bob@example.com", "body=hello"]}
# mailto:gorby%25kremvax@example.com
@@ -79,7 +79,7 @@ class TestMailTo < Test::Unit::TestCase
# mailto:unlikely%3Faddress@example.com?blat=foop
ok << ["mailto:unlikely%3Faddress@example.com?blat=foop"]
ok[-1] << ["unlikely%3Faddress@example.com", ["blat=foop"]]
- ok[-1] << {:to => "unlikely%3Faddress@example.com",
+ ok[-1] << {:to => "unlikely%3Faddress@example.com",
:headers => ["blat=foop"]}
ok_all = ok.flatten.join("\0")