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

Use URI.decode_www_form_component [Bug #10774]

`parser` refered RFC2396_Parser, but it is separated.
test is contributed by Dominik Menke

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2016-12-12 15:24:28 +00:00
parent 31f17f880e
commit 6c0aece53d
2 changed files with 11 additions and 5 deletions

View file

@ -187,6 +187,12 @@ class TestMailTo < Test::Unit::TestCase
u.select(:scheme, :host, :not_exist, :port)
end
end
def test_to_mailtext
u = URI.parse('mailto:ruby-list@ruby-lang.org?Subject=subscribe&cc=myaddr')
assert_equal "To: ruby-list@ruby-lang.org\nSubject: subscribe\nCc: myaddr\n\n\n",
u.to_mailtext
end
end