summaryrefslogtreecommitdiff
path: root/test/uri
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-27 19:26:43 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-06-27 19:26:43 +0000
commite63ab5d3ad289767eab49787e4e33390b0ce74e1 (patch)
tree5b7b2c9d26553b8d43502d1c10a25b0d6098951e /test/uri
parent402d33fc44b20779a90e9381cfd4f52154dfd872 (diff)
downloadbundler-e63ab5d3ad289767eab49787e4e33390b0ce74e1.tar.gz
* lib/uri/mailto.rb: update to latest specs, RFC 6068 and HTML5.
* lib/uri/mailto.rb (HEADER_PATTERN): removed. * lib/uri/mailto.rb (HEADER_REGEXP): use RFC 6068 hfields. * lib/uri/mailto.rb (EMAIL_REGEXP): use HTML5 email regexp. * lib/uri/mailto.rb (URI::MailTo.build): support multiple to addresses. * lib/uri/mailto.rb (URI::MailTo#initialize): Support multiple to addresses. Don't check with regexp, only split. * lib/uri/mailto.rb (URI::MailTo#check_to): verify by matching URI path-rootless and HTML5 email regexp with unescaped one. * lib/uri/mailto.rb (URI::MailTo#check_headers): verify only by HEADER_REGEXP. * lib/uri/mailto.rb (URI::MailTo#set_headers): don't check by HEADER_REGEXP, only split it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46590 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/uri')
-rw-r--r--test/uri/test_mailto.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/uri/test_mailto.rb b/test/uri/test_mailto.rb
index c2158845e8..661f7f7a9c 100644
--- a/test/uri/test_mailto.rb
+++ b/test/uri/test_mailto.rb
@@ -26,6 +26,10 @@ class TestMailTo < Test::Unit::TestCase
ok[-1] << ["chris@example.com", nil]
ok[-1] << {:to => "chris@example.com"}
+ ok << ["mailto:foo+@example.com,bar@example.com"]
+ ok[-1] << [["foo+@example.com", "bar@example.com"], nil]
+ ok[-1] << {:to => "foo+@example.com,bar@example.com"}
+
# mailto:infobot@example.com?subject=current-issue
ok << ["mailto:infobot@example.com?subject=current-issue"]
ok[-1] << ["infobot@example.com", ["subject=current-issue"]]